(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.3' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    246693,       5387]
NotebookOptionsPosition[    227542,       4978]
NotebookOutlinePosition[    228215,       5004]
CellTagsIndexPosition[    228134,       4999]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[{
 "New in: ",
 Cell["0.7", "HistoryData",
  CellTags->"New",ExpressionUUID->"d7613198-8585-4f56-ab46-a2386bb67b9f"],
 " | Modified in: ",
 Cell[" 2.0.0", "HistoryData",
  CellTags->"Modified",ExpressionUUID->"af250686-2555-438e-bfd0-47c2ac969c02"],
 " | Obsolete in: ",
 Cell[" ", "HistoryData",
  CellTags->"Obsolete",ExpressionUUID->"9a4e8bf1-a4be-4d22-b1c9-d1f984344745"],
 " | Excised in: ",
 Cell[" ", "HistoryData",
  CellTags->"Excised",ExpressionUUID->"e3397f0b-dc39-464d-bced-df03b205b6fe"]
}], "History",
 CellChangeTimes->{{3.7741623188510723`*^9, 3.7741623211980677`*^9}, {
  3.782059104118816*^9, 3.78205910482275*^9}},
 CellID->1247902091,ExpressionUUID->"fdc71b54-ac06-4bbc-97ac-9700b4288ae1"],

Cell[CellGroupData[{

Cell["Categorization", "CategorizationSection",
 CellID->1122911449,ExpressionUUID->"e9dddc8d-d210-4bc1-81aa-e0155fbd0f28"],

Cell["Symbol", "Categorization",
 CellLabel->"Entity Type",
 CellID->686433507,ExpressionUUID->"f74d4bf7-b42e-43b0-8923-84387668c780"],

Cell["MaXrd", "Categorization",
 CellChangeTimes->{3.743836663175869*^9},
 CellLabel->"Paclet Name",
 CellID->605800465,ExpressionUUID->"357884a1-475b-4f77-bb40-04f1f75163f9"],

Cell["MaXrd`", "Categorization",
 CellChangeTimes->{3.7438366635029488`*^9},
 CellLabel->"Context",
 CellID->468444828,ExpressionUUID->"853435b8-965f-48a9-8a09-7b828a751ff7"],

Cell["MaXrd/ref/InputCheck", "Categorization",
 CellChangeTimes->{3.743836663862268*^9},
 CellLabel->"URI",ExpressionUUID->"ea8230b8-3985-46a4-ad52-c4eb4cf86943"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Keywords", "KeywordsSection",
 CellID->477174294,ExpressionUUID->"60e8163c-620a-468e-a1e1-75370b55eaaf"],

Cell["XXXX", "Keywords",
 CellID->1164421360,ExpressionUUID->"29b99378-56fa-4d85-a5b8-449d6fe4dd15"]
}, Closed]],

Cell[CellGroupData[{

Cell["Syntax Templates", "TemplatesSection",
 CellID->1872225408,ExpressionUUID->"eddd82dd-3c25-4cdd-a392-bf8ca2f808d2"],

Cell[BoxData[""], "Template",
 CellLabel->"Additional Function Template",
 CellID->1562036412,ExpressionUUID->"d5e032e7-1745-4899-9c1c-4c24a3c98ccc"],

Cell[BoxData[""], "Template",
 CellLabel->"Arguments Pattern",
 CellID->158391909,ExpressionUUID->"aae2125b-a9a0-404c-9dd4-59c485c6ab9c"],

Cell[BoxData[""], "Template",
 CellLabel->"Local Variables",
 CellID->1360575930,ExpressionUUID->"9f599eaa-98d9-4bec-82fd-b903bce3cfd1"],

Cell[BoxData[""], "Template",
 CellLabel->"Color Equal Signs",
 CellID->793782254,ExpressionUUID->"6d648b74-eb73-4649-89f8-b82322861197"]
}, Closed]],

Cell[CellGroupData[{

Cell["Details", "DetailsSection",
 CellID->307771771,ExpressionUUID->"a14dbfd8-6ea5-467c-919b-4061d93639cf"],

Cell["XXXX", "Details",
 CellLabel->"Lead",
 CellID->670882175,ExpressionUUID->"2c22aab7-f8b2-4db3-8d58-a7f10104032c"],

Cell["XXXX", "Details",
 CellLabel->"Developers",
 CellID->350963985,ExpressionUUID->"73898f00-f29f-42b6-9411-63b8853a39c4"],

Cell["XXXX", "Details",
 CellLabel->"Authors",
 CellID->8391405,ExpressionUUID->"3b9ca9b3-6a6e-4025-bf93-fde8b1fc8a00"],

Cell["XXXX", "Details",
 CellLabel->"Feature Name",
 CellID->3610269,ExpressionUUID->"bf9075d1-d1c5-4c0f-b79c-5c5b21b66556"],

Cell["XXXX", "Details",
 CellLabel->"QA",
 CellID->401364205,ExpressionUUID->"6af75976-a00d-4dcc-acab-d3e1df6358d0"],

Cell["XXXX", "Details",
 CellLabel->"DA",
 CellID->350204745,ExpressionUUID->"b5c23224-9017-4a26-a9e5-5e1b475243da"],

Cell["XXXX", "Details",
 CellLabel->"Docs",
 CellID->732958810,ExpressionUUID->"c0b9fcf3-ecb2-4719-832b-98e178ef467e"],

Cell["XXXX", "Details",
 CellLabel->"Features Page Notes",
 CellID->222905350,ExpressionUUID->"b9cc9b4f-d0ef-4ae5-afc2-f1f0c3a21aa6"],

Cell["XXXX", "Details",
 CellLabel->"Comments",
 CellID->240026365,ExpressionUUID->"130363d4-35b8-4193-8170-e591801c3073"]
}, Closed]],

Cell[CellGroupData[{

Cell["InputCheck", "ObjectName",
 CellID->1224892054,ExpressionUUID->"3baa8d83-4af8-44db-8ef6-3d3268c9ff04"],

Cell[TextData[{
 Cell["      ", "ModInfo",ExpressionUUID->
  "1dffb120-0964-427a-95d1-4bd7ffebfe00"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["InputCheck",
    BaseStyle->"Link",
    ButtonData->"paclet:MaXrd/ref/InputCheck"], "[", 
   StyleBox[
    RowBox[{"snippet", ",", "input\[Ellipsis]"}], "TI"], "]"}]], 
  "InlineFormula",ExpressionUUID->"8a886af0-2286-456b-93e0-44f82b2bd287"],
 "\[LineSeparator]runs a global code ",
 Cell[BoxData[
  StyleBox["snippet", "TI"]], "InlineFormula",ExpressionUUID->
  "479ce008-bf61-4cdf-ab1c-25266bedb7b8"],
 " on zero or more ",
 Cell[BoxData[
  StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
  "1db1db84-ff74-4e14-bd85-56d68e1dafe1"],
 " parameters.\n",
 Cell["   ", "ModInfo",ExpressionUUID->"7ce3dbae-1c9b-4673-a51d-00832b21860e"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["InputCheck",
    BaseStyle->"Link",
    ButtonData->"paclet:MaXrd/ref/InputCheck"], "[", 
   RowBox[{
    StyleBox["input", "TI"], ",", 
    SubscriptBox[
     StyleBox["label", "TI"], 
     StyleBox["1", "TR"]], ",", 
    StyleBox["\[Ellipsis]", "TR"], ",", 
    SubscriptBox[
     StyleBox["label", "TI"], 
     StyleBox["n", "TI"]]}], "]"}]], "InlineFormula",ExpressionUUID->
  "fc634fa5-1a01-4dd5-af36-05f5a7bd8ed2"],
 " \[LineSeparator]checks reflection or coordinate ",
 Cell[BoxData[
  StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
  "8e5eb8b6-5c55-4fbc-a563-55adcc231909"],
 " according to each ",
 Cell[BoxData[
  SubscriptBox[
   StyleBox["label", "TI"], 
   StyleBox["i", "TI"]]], "InlineFormula",ExpressionUUID->
  "bb5a1a4d-71d3-4fa1-8a67-98a2f163b73d"],
 "."
}], "Usage",
 CellChangeTimes->{{3.6857039133083143`*^9, 3.685704064159664*^9}, {
  3.6857041231169777`*^9, 3.685704130173358*^9}, {3.774161650197043*^9, 
  3.7741616984723177`*^9}, {3.783800639666356*^9, 3.783800658278431*^9}, {
  3.783800754088579*^9, 3.7838007596137543`*^9}, {3.786953038399222*^9, 
  3.786953042614181*^9}, {3.7869534040141783`*^9, 3.7869534421047564`*^9}, {
  3.78695348407682*^9, 3.786953518187636*^9}},
 CellID->982511436,ExpressionUUID->"41256e38-425c-470a-8ab5-cfb59d42c9ac"],

Cell["\<\
This function is used to check input for other functions, and will throw \
error messages and abort the operations when necessary.\
\>", "Notes",
 CellChangeTimes->{{3.7301445969655046`*^9, 3.73014464896076*^9}, {
  3.786984775782393*^9, 3.7869847860441628`*^9}},
 CellID->1871022088,ExpressionUUID->"001f21fe-2a54-4b11-872c-0fba927120ca"],

Cell[TextData[{
 "The following ",
 Cell[BoxData[
  StyleBox["snippet", "TI"]], "InlineFormula",ExpressionUUID->
  "ca7ae15d-9df9-4ba3-9f11-634f398d46c7"],
 "s are available:"
}], "Notes",
 CellChangeTimes->{{3.774161710392116*^9, 3.774161722297903*^9}},
 CellID->1609912826,ExpressionUUID->"76d29b1a-3291-40a4-b01f-8ff190a41293"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "00a81db0-9717-4413-b291-92d90d9d8e9e"], "\"\<CrystalQ\>\"", Cell[
    TextData[{
     "check if ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "3eff44b0-81a3-4bc6-bb19-a92f36675362"],
     " exists in ",
     StyleBox[ButtonBox["$CrystalData",
      BaseStyle->"Link",
      ButtonData->"paclet:MaXrd/ref/$CrystalData"], "InlineCode"]
    }], "TableText",ExpressionUUID->"ae4f6648-df49-425c-bfd2-e67398b3cdc5"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "66647c3a-5987-4c81-b1fe-1e5985c66507"], "\"\<GetCentringVectors\>\"", 
    Cell[TextData[{
     "returns the centring vectors for centring type ",
     StyleBox["\"P\"", "InlineCode"],
     ", ",
     StyleBox["\"F\"", "InlineCode"],
     ", ",
     StyleBox["\"I\"", "InlineCode"],
     ", ",
     StyleBox["\"R\"", "InlineCode"],
     ", ",
     StyleBox["\"A\"", "InlineCode"],
     ", ",
     StyleBox["\"B\"", "InlineCode"],
     ", ",
     StyleBox["\"C\"", "InlineCode"],
     " or ",
     StyleBox["\"H\"", "InlineCode"]
    }], "TableText",ExpressionUUID->"f1c96636-9548-4aad-b5f5-820061625138"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "31724c03-7e8b-4ab1-96e0-c7c9f93630df"], 
    "\"\<GetCrystalFamilyMetric\>\"", Cell[
    "returns metric for dummy cell of the given crystal family", "TableText",
     ExpressionUUID->"0d143403-c516-41a9-b306-43b559284711"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "3909c6d1-7930-4d07-880d-2afae15e82f6"], 
    "\"\<GetCrystalFormulaUnits\>\"", Cell[TextData[{
     "returns the value if stored with ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "f11c1ed2-de8b-423b-967f-93967e76bbed"],
     "; queries user if not"
    }], "TableText",ExpressionUUID->"ee67fad5-5e68-413c-b1d8-92062801b66b"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "36ba923a-9a31-422e-b37f-f6b02ae5d0fc"], "\"\<GetCrystalSpaceGroup\>\"", 
    Cell[TextData[{
     "returns the space group of ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "78255663-a7b2-4e17-b55c-6e173ff70aa1"],
     " (validity is checked)"
    }], "TableText",ExpressionUUID->"0db64cad-9c8d-4a76-9f7b-1c853464e73b"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "fb39639a-c52e-4012-bd7d-0a2a0b7dca3d"], "\"\<GetCrystalWavelength\>\"", 
    Cell["\<\
extracts the wavelength of crystal; returns error if not available\
\>", "TableText",ExpressionUUID->"25d6c2b8-7fac-4465-bc87-a77023495cab"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "3867463f-c677-49ae-bdcf-2e482376c3da"], "\"\<GetEnergyWavelength\>\"", 
    Cell["returns the input converted to \[ARing]ngstr\[ODoubleDot]ms", 
     "TableText",ExpressionUUID->"32196251-a983-4abf-bc8e-9b66a172a189"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "e69024e5-e8c8-4b4d-9741-e3ef9f08c980"], 
    "\"\<GetPointSpaceGroupCrystal\>\"", Cell[TextData[{
     "returns the ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "581b5b09-4585-41a1-b9b1-ab66b455f866"],
     " if point- or space gorup, or returns the space group of ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "2265d02d-c2b5-45c4-b858-6719ca8884ef"]
    }], "TableText",ExpressionUUID->"9fa6c9d2-0dfa-4732-b384-26f3c9f8e9fc"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "dc9546d1-ece5-4ad7-b837-999457e5cc00"], 
    "\"\<GetReciprocalImageOrientation\>\"", Cell[
    "obtain reciprocal layer specification (for simulations)", "TableText",
     ExpressionUUID->"f543cb31-9293-4f55-8283-bd0b0f8494b5"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "8394b474-cbec-453d-8a94-7fb526433ca2"], "\"\<InterpretElement\>\"", 
    Cell["\<\
returns the chemical element (or ion) as interpreted from input\
\>", "TableText",ExpressionUUID->"545d35c0-c0dd-47a1-9862-eb6fbc18e910"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "108f2412-ed31-4346-bedc-f68e770bea76"], "\"\<InterpretSpaceGroup\>\"", 
    Cell["interprets and returns space group symbol of input", "TableText",
     ExpressionUUID->"41ca1d93-cfad-4895-984f-f904a38fb27a"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "c7d3e399-4893-4078-8002-ac5c0f1ea5dc"], "\"\<PointGroupQ\>\"", Cell[
    "checks whether input is a point group", "TableText",ExpressionUUID->
     "ff1f3825-88bd-4077-bd8f-71031d9f9135"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "a4274b57-946a-489d-a78c-580b866585d8"], "\"\<PointSpaceGroupQ\>\"", 
    Cell[TextData[{
     "checks wheter input is a point group ",
     StyleBox["or",
      FontSlant->"Italic"],
     " a space group"
    }], "TableText",ExpressionUUID->"e5e088f9-fc35-48cf-ba55-a11af449db2a"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "1711d121-230c-42ae-b390-2c1483807318"], "\"\<Polarisation\>\"", Cell["\<\
returns the polarisation factor based in inputted type label and scattering \
angle\
\>", "TableText",ExpressionUUID->"94954c38-6265-4376-8ed3-8b8a5269445d"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "4f6cbd42-8236-4a39-8804-2f6a3481d620"], "\"\<ProcessWavelength\>\"", 
    Cell[TextData[{
     "combines \"",
     StyleBox["GetCrystalWavelength\"", "InlineCode"],
     " and \"",
     StyleBox["GetEnergyWavelength\"", "InlineCode"]
    }], "TableText",ExpressionUUID->"0b2be125-a2c0-438c-a290-2fb0e2d44dcd"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "122a703e-46c7-42d9-89fe-dc91ec6e7c28"], 
    "\"\<RotationTransformation\>\"", Cell[
    "returns a transformation function (for crystal blocks)", "TableText",
     ExpressionUUID->"543ee2c0-1481-4fe9-a8c1-4911cf56bf98"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "b4429f0a-e01b-4c07-bb30-b6b82847d6b5"], 
    "\"\<Update$CrystalDataAutoCompletion\>\"", Cell[
    "updates the auto completion list of available crystals", "TableText",
     ExpressionUUID->"53cac1ba-662b-4073-8f82-0174a3ccc439"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "4be7f1b9-8e06-40d4-a958-63b1a0036bc2"], 
    "\"\<Update$CrystalDataFile\>\"", Cell[TextData[{
     "adds new data to ",
     Cell[BoxData[
      ButtonBox["$CrystalData",
       BaseStyle->"Link",
       ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
      ExpressionUUID->"c6d47f94-7e9a-43f7-98c7-57d48c9d0cab"],
     " and updates the data file"
    }], "TableText",ExpressionUUID->"0fb5d2b8-be55-4ee9-a7d5-8ad7030e9906"]}
  }]], "2ColumnTableMod",
 TaggingRules->{"Alphabetized" -> True},
 CellChangeTimes->{{3.6857041593039923`*^9, 3.685704385885721*^9}, {
   3.712470119136633*^9, 3.712470142546645*^9}, {3.712470206096217*^9, 
   3.712470208409944*^9}, {3.712470250039815*^9, 3.712470263198851*^9}, {
   3.7129910206978903`*^9, 3.712991022112116*^9}, 3.712991429165224*^9, {
   3.712991492974319*^9, 3.712991521880334*^9}, {3.713604767567864*^9, 
   3.713604809407094*^9}, {3.71361037432854*^9, 3.71361041316577*^9}, {
   3.726899677829771*^9, 3.726899757529422*^9}, {3.72689979189118*^9, 
   3.7268997918938103`*^9}, {3.727604075156392*^9, 3.727604095197422*^9}, {
   3.727604147054541*^9, 3.727604152105096*^9}, {3.7276041868043747`*^9, 
   3.727604243143778*^9}, {3.727604284877911*^9, 3.727604300701682*^9}, {
   3.7276043426864347`*^9, 3.72760436847675*^9}, {3.727604415553624*^9, 
   3.7276045388666162`*^9}, {3.730144747192552*^9, 3.730144788357606*^9}, {
   3.730395585914061*^9, 3.7303956257751303`*^9}, {3.734082943487529*^9, 
   3.73408299298884*^9}, {3.7372783585322533`*^9, 3.73727837669975*^9}, {
   3.737278428579174*^9, 3.737278521718905*^9}, {3.7379758575998173`*^9, 
   3.737975879365003*^9}, {3.779729857167234*^9, 3.7797298828131638`*^9}, {
   3.77972996006717*^9, 3.779730104392271*^9}, {3.782053052672249*^9, 
   3.782053063694969*^9}, {3.7820533183803873`*^9, 3.782053329428041*^9}, {
   3.782314567079959*^9, 3.782314593804244*^9}, {3.7838011070092297`*^9, 
   3.783801159069952*^9}, {3.7869617042704697`*^9, 3.7869617078111773`*^9}, {
   3.7879192681334763`*^9, 3.787919273730041*^9}, {3.787919323222086*^9, 
   3.787919329308339*^9}, {3.787919821795185*^9, 3.787919845215641*^9}},
 CellID->222684676,ExpressionUUID->"3103cd53-00df-4411-965b-4abf63b7101f"],

Cell["\<\
When working with a reflection or coordinate tuples, the following labels are \
recognised by the function.\
\>", "Notes",
 CellChangeTimes->{{3.737278179087699*^9, 3.7372782155037813`*^9}, {
  3.783800705144539*^9, 3.783800705629651*^9}, {3.786951598124237*^9, 
  3.786951611480281*^9}, {3.7869529882636957`*^9, 3.7869530090470953`*^9}},
 CellID->221498276,ExpressionUUID->"8484f326-b3fa-4348-934d-718b122fc57f"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "029e1001-b3e7-4f34-bc62-01fe56ad2698"], "\"\<1hkl\>\"", Cell[TextData[{
     "checks if only one reflection is contained in ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "8d74bcf9-27ef-47fc-9a85-597b7d70ca83"]
    }], "TableText",ExpressionUUID->"17301f26-fb94-4e6f-ac09-3b189c2e18d9"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "52dacb9c-7d9b-4798-b537-d7f0c20e13e8"], "\"\<1xyz\>\"", Cell[TextData[{
     "checks if only one coordinate is contained in ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "84e3d47e-9dbf-4e87-90aa-33a259c90f9f"]
    }], "TableText",ExpressionUUID->"e0220099-be34-4e83-8407-4e9d3f37a69a"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "4faa099d-7565-4ea4-9b81-1d2472993ec7"], "\"\<Integer\>\"", Cell[
    "checks whether all indices are integers", "TableText",ExpressionUUID->
     "482f8a1a-5a4a-46c0-b265-355c57b7bb24"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "ff800299-feac-48c2-b1f6-3272689faa7e"], "\"\<Mutliple\>\"", Cell[
    TextData[{
     "checks if at least two entries are contained in ",
     Cell[BoxData[
      StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
      "de9616da-5401-49e7-88d9-86a350e926db"]
    }], "TableText",ExpressionUUID->"878c54d0-c91d-41a4-8f64-0248705052d4"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "3bc48d8a-2c29-4e28-bbf4-058cd67d1b21"], "\"\<StringSymbol\>\"", Cell[
    TextData[{
     "checks if the heads of the indices are either ",
     StyleBox["Integer", "InlineCode"],
     ", ",
     StyleBox["String", "InlineCode"],
     " or ",
     StyleBox["Symbol", "InlineCode"]
    }], "TableText",ExpressionUUID->"37e8829d-f66d-4199-8f33-53fae887aa23"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "5df26e51-ec11-430c-9483-d8f6f38b7adc"], "\"\<WrapSingle\>\"", Cell[
    TextData[{
     "returns single reflections ",
     Cell[BoxData[
      RowBox[{"{", 
       RowBox[{
        StyleBox["h", "TI"], ",", 
        StyleBox["k", "TI"], ",", 
        StyleBox["l", "TI"]}], "}"}]], "InlineFormula",ExpressionUUID->
      "7178fe90-8f61-45f6-bb90-f693a233ea65"],
     " as ",
     Cell[BoxData[
      RowBox[{"{", 
       RowBox[{"{", 
        RowBox[{
         StyleBox["h", "TI"], ",", 
         StyleBox["k", "TI"], ",", 
         StyleBox["l", "TI"]}], "}"}], "}"}]], "InlineFormula",ExpressionUUID->
      "628b9fcd-4271-47de-b9a0-7c84979ba8d3"]
    }], "TableText",ExpressionUUID->"dacc1059-b653-4208-ab4a-1521cd718104"]}
  }]], "2ColumnTableMod",
 TaggingRules->{"Alphabetized" -> True},
 CellChangeTimes->{{3.6857041593039923`*^9, 3.685704385885721*^9}, {
   3.712470119136633*^9, 3.712470142546645*^9}, {3.712470206096217*^9, 
   3.712470208409944*^9}, {3.712470250039815*^9, 3.712470263198851*^9}, {
   3.7129910206978903`*^9, 3.712991022112116*^9}, 3.712991429165224*^9, {
   3.712991492974319*^9, 3.712991521880334*^9}, {3.713604767567864*^9, 
   3.713604809407094*^9}, {3.71361037432854*^9, 3.71361041316577*^9}, {
   3.726899677829771*^9, 3.726899757529422*^9}, {3.72689979189118*^9, 
   3.7268997918938103`*^9}, {3.727604075156392*^9, 3.727604095197422*^9}, {
   3.727604147054541*^9, 3.727604152105096*^9}, {3.7276041868043747`*^9, 
   3.727604243143778*^9}, {3.727604284877911*^9, 3.727604300701682*^9}, {
   3.7276043426864347`*^9, 3.72760436847675*^9}, {3.727604415553624*^9, 
   3.7276045388666162`*^9}, {3.730144747192552*^9, 3.730144788357606*^9}, {
   3.730395585914061*^9, 3.7303956257751303`*^9}, {3.734082943487529*^9, 
   3.73408299298884*^9}, {3.737278228918571*^9, 3.737278299718014*^9}},
 CellID->1183224025,ExpressionUUID->"cdb14cca-8cd5-4f48-a1cf-86ce05380363"],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["Dimensions",
   BaseStyle->"Link",
   ButtonData->"paclet:ref/Dimensions"]], "InlineFormula",ExpressionUUID->
  "6bbf7e0c-1497-4c6c-ba88-15c93ac63fab"],
 " of ",
 Cell[BoxData[
  StyleBox["input", "TI"]], "InlineFormula",ExpressionUUID->
  "478ea02d-6178-4047-9ec7-893834c3210d"],
 " will always be checked if the head is ",
 Cell[BoxData[
  ButtonBox["List",
   BaseStyle->"Link",
   ButtonData->"paclet:ref/List"]], "InlineFormula",ExpressionUUID->
  "ada6f961-ad91-4527-a375-53cd72ebd4cd"],
 "."
}], "Notes",
 CellChangeTimes->{{3.685704420969385*^9, 3.6857044611269083`*^9}, 
   3.712470238961151*^9, {3.71361042369636*^9, 3.713610450789268*^9}, {
   3.7741585490727663`*^9, 3.774158569347814*^9}},
 CellID->1298381760,ExpressionUUID->"d4a11f0a-aaba-46df-b325-8f93165e101d"],

Cell[TextData[{
 "When using the ",
 Cell[BoxData[
 "\"\<EnergyWavelength\>\""], "InlineFormula",ExpressionUUID->
  "65795def-59a3-4db4-b0d0-9aaa19f9a202"],
 " label, inputted numbers that are 5 or smaller will be interpreted as \
having \[ARing]ngstr\[ODoubleDot]m as unit; numbers up to 250 are considered \
to be in kiloelectronvolts; larger numbers are considered to be in \
electronvolts."
}], "Notes",
 CellChangeTimes->{{3.726900086358438*^9, 3.7269002155328627`*^9}, {
  3.7269002482495213`*^9, 3.726900284565283*^9}},
 CellID->1980014868,ExpressionUUID->"7251811d-94d2-4407-9797-e6db10c5a23b"],

Cell[TextData[{
 "The ",
 StyleBox["\"RotationTransformation\"", "InlineCode"],
 " module supports four types of ",
 StyleBox["anchor references",
  FontSlant->"Italic"],
 ". Here are descriptions of where the rotation anchors are placed:"
}], "Notes",
 CellChangeTimes->{{3.7820531085363617`*^9, 3.7820531236310787`*^9}, {
  3.782053172559567*^9, 3.78205317485262*^9}, {3.782053217405322*^9, 
  3.7820532469116173`*^9}, {3.782053300482664*^9, 3.782053300857889*^9}, {
  3.782057270404574*^9, 3.782057281925674*^9}, {3.782057365942227*^9, 
  3.7820573883963118`*^9}},
 CellID->283416834,ExpressionUUID->"c8f47927-3ddc-40a6-82b0-ef04babec71b"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "12a2b3b6-c3ea-4079-a385-3f693a63caf1"], "\"\<Host\>\"", Cell[
    "origin of the host structure", "TableText",ExpressionUUID->
     "1281a60d-92d2-4d91-b3a9-3dcb09af44ef"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "a54ade73-486d-4bdf-ad2a-4b772ba9c0bb"], "\"\<Domain\>\"", Cell["\<\
origin of each domain's cell that is closest to the host's origin\
\>", "TableText",ExpressionUUID->"7af4f78d-773d-4efd-82d9-113b78d77780"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "6398209f-16b7-4e54-b3e2-6c306367b190"], "\"\<DomainCentroid\>\"", Cell[
    "centroid of each domain", "TableText",ExpressionUUID->
     "c3bdf903-8993-45f9-a43b-ecf9f11ef4cf"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "16e964c7-60a8-4d7d-b659-40687305c8f3"], "\"\<Unit\>\"", Cell[
    "origin of each unit", "TableText",ExpressionUUID->
     "a0f9a911-201a-4c5e-b49f-fbb3ea11c648"]}
  }]], "2ColumnTableMod",
 CellChangeTimes->{{3.782053278908352*^9, 3.782053297617955*^9}, {
  3.782057391374905*^9, 3.782057443198545*^9}, {3.782057489230136*^9, 
  3.782057491133926*^9}, {3.7820587454014053`*^9, 3.782058842221633*^9}},
 CellID->1473782279,ExpressionUUID->"19a93e2a-2192-426a-a1d0-af143e27aeb6"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Tutorials", "TutorialsSection",
 CellID->250839057,ExpressionUUID->"e9f00a5a-edd0-4bfb-9d62-cdb78d58f8cd"],

Cell[TextData[ButtonBox["Using the rotation options",
 BaseStyle->"Link",
 ButtonData->"paclet:MaXrd/tutorial/UsingRotationMaps"]], "Tutorials",
 CellChangeTimes->{{3.782113438247541*^9, 3.782113454003908*^9}},
 CellID->341631938,ExpressionUUID->"4551fb7f-c2d2-4841-a50b-d7c6d7b29168"],

Cell["XXXX", "Tutorials",
 CellID->1463871110,ExpressionUUID->"ffe234c0-d9f9-4a50-b5cc-af7ff673b32a"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Demonstrations", "RelatedDemonstrationsSection",
 CellID->1268215905,ExpressionUUID->"7d7e4ddc-ff24-46b0-ab50-8cae9facf2e4"],

Cell["XXXX", "RelatedDemonstrations",
 CellID->1129518860,ExpressionUUID->"5203a146-6140-40a7-9ab3-82202a61da10"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Links", "RelatedLinksSection",
 CellID->1584193535,ExpressionUUID->"1b8f8346-6e94-40dc-8d25-c0eb7572bb7b"],

Cell["XXXX", "RelatedLinks",
 CellID->1038487239,ExpressionUUID->"3e7c68e8-cd5c-4aef-ae06-a19bcff9cad4"]
}, Open  ]],

Cell[CellGroupData[{

Cell["See Also", "SeeAlsoSection",
 CellID->1255426704,ExpressionUUID->"cd66dfec-b844-4e8d-bbc6-50e2b739eee8"],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["GetAtomicScatteringFactors",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/GetAtomicScatteringFactors"]], 
  "InlineFormula",ExpressionUUID->"2584139c-df46-49ec-b3ab-d95d0a7c326e"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["AttenuationCoefficient",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/AttenuationCoefficient"]], "InlineFormula",
  ExpressionUUID->"dcc8abd8-7840-497b-b4d6-2d3df1be2f4d"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["BraggAngle",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/BraggAngle"]], "InlineFormula",
  ExpressionUUID->"c8685983-7112-49f2-b114-30e5ccd318bd"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["CrystalDensity",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/CrystalDensity"]], "InlineFormula",
  ExpressionUUID->"9e4a70bd-d503-493d-9811-9a756c35c47f"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["GetCrystalMetric",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/GetCrystalMetric"]], "InlineFormula",
  ExpressionUUID->"7af55df9-e2e9-4f4a-bed6-ac6ac0b063fa"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["DarwinWidth",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/DarwinWidth"]], "InlineFormula",
  ExpressionUUID->"6b36c40c-9028-44bf-9d58-bfe1229998f9"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["ExtinctionLength",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/ExtinctionLength"]], "InlineFormula",
  ExpressionUUID->"2c0565fb-64a7-426a-9226-4fb318d24087"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["InterplanarSpacing",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/InterplanarSpacing"]], "InlineFormula",
  ExpressionUUID->"fcbb714f-94d0-4c29-bcd0-20891ac3e71b"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["GetLatticeParameters",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/GetLatticeParameters"]], "InlineFormula",
  ExpressionUUID->"8e812723-8e9a-47f8-a40b-ae54b4a09155"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["SymmetryEquivalentReflections",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/SymmetryEquivalentReflections"]], 
  "InlineFormula",ExpressionUUID->"72085e1e-dd81-4738-ac8d-f867dbb1e177"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["MergeSymmetryEquivalentReflections",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/MergeSymmetryEquivalentReflections"]], 
  "InlineFormula",ExpressionUUID->"181d8249-a6fd-4bc0-bfd6-5af75b48b044"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["$GroupSymbolRedirect",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$GroupSymbolRedirect"]], "InlineFormula",
  ExpressionUUID->"09894eef-7216-4fd5-b4cd-004747ebe70b"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"cd053f37-81d3-4e5e-ba2b-ef94403898e7"]
}], "SeeAlso",
 CellChangeTimes->{{3.730144904861742*^9, 3.73014497690689*^9}, {
  3.737968449383374*^9, 3.737968506274226*^9}, {3.743865461526078*^9, 
  3.743865461526929*^9}, {3.743865861333652*^9, 3.7438658613341*^9}},
 CellID->929782353,ExpressionUUID->"de3c51f2-79e1-44fd-85a3-a08757257073"]
}, Open  ]],

Cell[CellGroupData[{

Cell["More About", "MoreAboutSection",
 CellID->38303248,ExpressionUUID->"3ade4251-f64b-4f1c-b390-ef6e588014a9"],

Cell["XXXX", "MoreAbout",
 CellID->1665078683,ExpressionUUID->"13391473-9a54-4fc0-b37a-9a3a1700f031"]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[GridBox[{
    {
     StyleBox["Examples", "PrimaryExamplesSection"], 
     ButtonBox[
      RowBox[{
       RowBox[{"More", " ", "Examples"}], " ", "\[RightTriangle]"}],
      BaseStyle->"ExtendedExamplesLink",
      ButtonData:>"ExtendedExamples"]}
   }],
  $Line = 0; Null]], "PrimaryExamplesSection",
 CellID->880084151,ExpressionUUID->"4776a377-a5f0-4a8b-a91a-c0f6323166ab"],

Cell[CellGroupData[{

Cell["More Examples", "ExtendedExamplesSection",
 CellTags->"ExtendedExamples",
 CellID->1854448968,ExpressionUUID->"d6f87363-4f4a-495d-87bb-c476bc779742"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "Scope", "ExampleSection",ExpressionUUID->
   "67d83800-f43b-4395-b88b-69b4075e31fa"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1293636265,ExpressionUUID->"acea0833-02cc-4701-aaf3-a3f17f675653"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "Checking tuples", "ExampleSubsection",ExpressionUUID->
   "6d128361-861a-4b62-a161-56740012a84d"],
  $Line = 0; Null]], "ExampleSubsection",
 CellChangeTimes->{{3.786951992376746*^9, 3.786952006870902*^9}, {
  3.786952634625517*^9, 3.786952652368793*^9}, {3.786952954401753*^9, 
  3.7869529576183023`*^9}},
 CellID->1809017597,ExpressionUUID->"2841bc05-4b3e-44c8-b508-51391b398f09"],

Cell["Basic checks of the dimensions of input:", "ExampleText",
 CellChangeTimes->{{3.685704512282283*^9, 3.685704533756753*^9}},
 CellID->1837160032,ExpressionUUID->"0a82a8cc-fb85-4469-a1af-3ea44c4eb58c"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"{", 
   RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}], "]"}]], "Input",
 CellChangeTimes->{{3.685682187670844*^9, 3.685682193912095*^9}, {
   3.6856941196527147`*^9, 3.6856941217345247`*^9}, 3.685695809212805*^9},
 CellLabel->"In[1]:=",
 CellID->1367903769,ExpressionUUID->"d699e5c1-a445-41a3-8e98-9bb4d0257a6e"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","InvalidTuple",
   "\"Reflections (and coordinates) must be on a \
{\\!\\(\\*\\nStyleBox[\\\"h\\\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"k\\\
\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"l\\\", \\\"TI\\\"]\\)} (or \
{\\!\\(\\*\\nStyleBox[\\\"x\\\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"y\\\
\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"z\\\", \\\"TI\\\"]\\)}) form\"",
   2,1,1,26775511822436251483,"Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.786985269309847*^9},
 CellLabel->"During evaluation of In[1]:=",
 CellID->794902605,ExpressionUUID->"623443de-6cd1-44c8-a00e-e8ce10e3b5cb"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{
  3.717150009874456*^9, 3.7301448500297537`*^9, 3.737975902088067*^9, {
   3.78698524484752*^9, 3.7869852693172817`*^9}},
 CellLabel->"Out[1]=",
 CellID->432314248,ExpressionUUID->"3c4eaf1a-a76a-410d-aca0-18528acaecb5"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"{", 
   RowBox[{"1", ",", 
    RowBox[{"{", "2", "}"}], ",", "3"}], "}"}], "]"}]], "Input",
 CellChangeTimes->{{3.685694125373831*^9, 3.685694126091176*^9}, 
   3.685695810015901*^9},
 CellLabel->"In[2]:=",
 CellID->1815249394,ExpressionUUID->"c1ae7082-04fb-4c8d-8f91-833ea8aaae60"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","InvalidTuple",
   "\"Reflections (and coordinates) must be on a \
{\\!\\(\\*\\nStyleBox[\\\"h\\\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"k\\\
\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"l\\\", \\\"TI\\\"]\\)} (or \
{\\!\\(\\*\\nStyleBox[\\\"x\\\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"y\\\
\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"z\\\", \\\"TI\\\"]\\)}) form\"",
   2,2,2,26775511822436251483,"Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.786985272328041*^9},
 CellLabel->"During evaluation of In[2]:=",
 CellID->1394884042,ExpressionUUID->"44fd7dd5-5983-4d1c-b671-f4f0dd92f1f9"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{
  3.717150010684304*^9, 3.730144850717598*^9, 3.737975902944869*^9, {
   3.786985244981324*^9, 3.786985272335803*^9}},
 CellLabel->"Out[2]=",
 CellID->1884603242,ExpressionUUID->"c9d82153-4f63-4cc4-9322-b599b1c8f86a"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"4", ",", "5"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"6", ",", "7", ",", "8"}], "}"}]}], "}"}], "]"}]], "Input",
 CellChangeTimes->{{3.685694131434422*^9, 3.685694139163189*^9}, 
   3.685695810968719*^9},
 CellLabel->"In[3]:=",
 CellID->461672276,ExpressionUUID->"f476ddf7-29ae-47ac-bba9-4c9401d0bcfa"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","InvalidTuple",
   "\"Reflections (and coordinates) must be on a \
{\\!\\(\\*\\nStyleBox[\\\"h\\\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"k\\\
\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"l\\\", \\\"TI\\\"]\\)} (or \
{\\!\\(\\*\\nStyleBox[\\\"x\\\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"y\\\
\", \\\"TI\\\"]\\), \\!\\(\\*\\nStyleBox[\\\"z\\\", \\\"TI\\\"]\\)}) form\"",
   2,3,3,26775511822436251483,"Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.7869852744688168`*^9},
 CellLabel->"During evaluation of In[3]:=",
 CellID->1892393033,ExpressionUUID->"7dc776de-315c-4572-8c91-22d206c42e29"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{
  3.7171500120531693`*^9, 3.73014485154694*^9, 3.737975903849699*^9, {
   3.786985245113818*^9, 3.786985274475733*^9}},
 CellLabel->"Out[3]=",
 CellID->1216893561,ExpressionUUID->"8a6f2c92-f0ce-463e-98de-329b5bc5b419"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "280f69d7-e4ef-4ab7-afde-84b82c411c43"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->467526121,ExpressionUUID->"0e182396-b6d4-4b4e-be5e-786810256602"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"4", ",", "5", ",", "6"}], "}"}]}], "}"}], ",", 
   "\"\<1hkl\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.68569416169731*^9, 3.685694176594686*^9}, 
   3.685695812640456*^9, {3.7129911059487143`*^9, 3.7129911065089817`*^9}},
 CellLabel->"In[1]:=",
 CellID->1466599491,ExpressionUUID->"06f3f384-6d0f-4d06-9976-949245899583"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","SingleTupleExpected",
   "\"Only one \\!\\(\\*RowBox[{\\\"\\\\\\\"reflection\\\\\\\"\\\"}]\\) \
expected.\"",2,1,4,26775511822436251483,"Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.786985276241426*^9},
 CellLabel->"During evaluation of In[1]:=",
 CellID->2071145711,ExpressionUUID->"4483dae0-52c8-4b56-82a8-9b20344d0c7a"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{3.7171500153164682`*^9, 3.730144854751865*^9, 
  3.737975908071785*^9, 3.786985245284391*^9, 3.786985276248909*^9},
 CellLabel->"Out[1]=",
 CellID->1183530554,ExpressionUUID->"4bac1ab8-984f-4a8b-97fd-277217eaed66"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"4", ",", "5", ",", "6.0"}], "}"}]}], "}"}], ",", 
   "\"\<Integer\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.6856942050075912`*^9, 3.685694213049779*^9}, 
   3.6856958157276773`*^9, {3.7428785343053837`*^9, 3.742878547591321*^9}},
 CellLabel->"In[2]:=",
 CellID->320344971,ExpressionUUID->"928167ca-584a-48ad-ad2d-cd4c49d9ac0e"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","IntegerExpected","\"One or more indices are not integers.\"",
   2,2,5,26775511822436251483,"Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.786985277288061*^9},
 CellLabel->"During evaluation of In[2]:=",
 CellID->1251631147,ExpressionUUID->"cee04f01-ac18-4a0e-9082-0dd907468543"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{3.717150016459592*^9, 3.730144855242116*^9, 
  3.737975908929323*^9, 3.786985245415841*^9, 3.786985277295439*^9},
 CellLabel->"Out[2]=",
 CellID->1562365264,ExpressionUUID->"44f5441f-3548-4ac5-a5a5-fc9ce004dbac"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", 
       RowBox[{"2", "/", "3"}], ",", "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"1.2", ",", "3.4", ",", "5.6"}], "}"}]}], "}"}], ",", 
   "\"\<StringSymbol\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.6856955099608507`*^9, 3.685695512162052*^9}, {
  3.685695818848517*^9, 3.685695845360194*^9}},
 CellLabel->"In[3]:=",
 CellID->296424568,ExpressionUUID->"e47e6529-b345-44e5-9a14-9d0c02d0d549"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","InvalidInputType",
   "\"Head of indices must be either Integer, String or Symbol.\"",2,3,6,
   26775511822436251483,"Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.7869852788976707`*^9},
 CellLabel->"During evaluation of In[3]:=",
 CellID->1484014596,ExpressionUUID->"c750b64f-589e-459a-9a9a-55cf5e21a8fa"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{3.717150017640448*^9, 3.7301448557922153`*^9, 
  3.737975909409686*^9, 3.78698524553706*^9, 3.786985278904975*^9},
 CellLabel->"Out[3]=",
 CellID->958238714,ExpressionUUID->"dc6fcbcd-d467-4556-9a6b-176cfc04c677"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "c297f54c-87b3-4ed1-bb3d-bbe4d83625c6"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->1993136983,ExpressionUUID->"a44c8ca0-8ed4-4e93-bee7-4cf7666b37f8"],

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"{", 
   RowBox[{"1", ",", "2", ",", "3"}], "}"}], "]"}]], "Input",
 CellChangeTimes->{{3.685698073225049*^9, 3.685698094268888*^9}},
 CellLabel->"In[1]:=",
 CellID->81829532,ExpressionUUID->"ea7f89c5-66d8-48cb-be36-c83cb0ffdf97"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", "\"\<WrapSingle\>\""}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.6856980842589693`*^9, 3.685698103245879*^9}, 
   3.782110182917725*^9},
 CellLabel->"In[2]:=",
 CellID->919410244,ExpressionUUID->"7c8f1a6e-cfab-4db6-b719-ea915c08d7a8"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"1", ",", "2", ",", "3"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.68570459349868*^9, 3.712991131916993*^9, 
  3.713610484718779*^9, 3.717150034349008*^9, 3.7301448596858883`*^9, 
  3.737975916345201*^9, 3.782110183414708*^9, 3.7869852459857388`*^9, 
  3.78698528534748*^9},
 CellLabel->"Out[2]=",
 CellID->583840801,ExpressionUUID->"e63781a7-a550-4b40-bf38-114535fbe48d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"4", ",", "5", ",", "6"}], "}"}]}], "}"}], ",", 
   "\"\<WrapSingle\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.6856981840459423`*^9, 3.685698208272111*^9}, 
   3.782110185523417*^9},
 CellLabel->"In[3]:=",
 CellID->1383130743,ExpressionUUID->"11bd0f99-b66f-4789-b2df-e070f9d19f82"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"1", ",", "2", ",", "3"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"4", ",", "5", ",", "6"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{3.685704593648739*^9, 3.71299113206889*^9, 
  3.713610485843293*^9, 3.717150035453704*^9, 3.730144860170301*^9, 
  3.737975917008471*^9, 3.782110185877932*^9, 3.786985246134454*^9, 
  3.7869852858765087`*^9},
 CellLabel->"Out[3]=",
 CellID->1181569721,ExpressionUUID->"d64395cb-e0f9-4c6d-b8b5-394a5e411cb2"]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "Snippet examples", "ExampleSubsection",ExpressionUUID->
   "2ff1d61d-394f-44ec-bcdb-5b43096a1267"],
  $Line = 0; Null]], "ExampleSubsection",
 CellChangeTimes->{{3.7869525658682623`*^9, 3.786952570746648*^9}, {
  3.786985221783146*^9, 3.786985225085829*^9}},
 CellID->417524222,ExpressionUUID->"9ee1c3d9-a461-4d27-bc1b-f2a8dae5b33a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"\"\<GetCentringVectors\>\"", ",", "\"\<R\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.734083043040859*^9, 3.734083053579599*^9}, {
  3.786985305909017*^9, 3.786985308140016*^9}},
 CellLabel->"In[1]:=",
 CellID->384054987,ExpressionUUID->"c10b12f9-4871-45c0-8891-d1f2f73cf981"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     FractionBox["2", "3"], ",", 
     FractionBox["1", "3"], ",", 
     FractionBox["1", "3"]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     FractionBox["1", "3"], ",", 
     FractionBox["2", "3"], ",", 
     FractionBox["2", "3"]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.7340830538612213`*^9, {3.734083085461985*^9, 3.734083094806801*^9}, 
   3.737975928182765*^9, 3.786985310901071*^9},
 CellLabel->"Out[1]=",
 CellID->1575633488,ExpressionUUID->"719d1440-8c48-4a09-b5a1-c9e43ce13282"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "1e2a0eed-1030-49d6-ace3-92f52fb562c0"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->1117509503,ExpressionUUID->"6d00d4e4-5e8d-4219-b145-61ac051b3cb1"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"\"\<GetEnergyWavelength\>\"", ",", 
   TemplateBox[{"24.5","\"keV\"","kiloelectronvolts","\"Kiloelectronvolts\""},
    
    "Quantity"]}], "]"}]], "Input",
 CellChangeTimes->{{3.73408310792307*^9, 3.7340831587314167`*^9}, {
  3.7869853135629807`*^9, 3.786985326794788*^9}},
 CellLabel->"In[1]:=",
 CellID->544578231,ExpressionUUID->"e53588fc-e2fb-46a2-bc6c-0b1b70ebeef8"],

Cell[BoxData[
 TemplateBox[{
  "0.5060579591836735`","\"\[CapitalARing]\"","\[ARing]ngstr\[ODoubleDot]ms",
   "\"Angstroms\""},
  "Quantity"]], "Output",
 CellChangeTimes->{{3.7340831378570423`*^9, 3.734083166906454*^9}, 
   3.7379759374358788`*^9, {3.786985328818503*^9, 3.786985330755918*^9}},
 CellLabel->"Out[1]=",
 CellID->989087980,ExpressionUUID->"984edd04-f759-4bcf-9fe5-3a51876dd1d2"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "28aab8c9-f04b-46dd-8213-7fdb7ac5610a"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->92703433,ExpressionUUID->"5b4aa924-618a-4ba2-9ac2-cdfc4ed727ec"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"\"\<InterpretElement\>\"", ",", "\"\<he\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.7379759559819717`*^9, 3.737975965739151*^9}, {
  3.786985335858637*^9, 3.786985337595455*^9}},
 CellLabel->"In[1]:=",
 CellID->1138377229,ExpressionUUID->"0063f588-4570-4e7d-bd04-72f6fc6f995b"],

Cell[BoxData["\<\"He\"\>"], "Output",
 CellChangeTimes->{3.737975966055003*^9, 3.737976125768098*^9, 
  3.742878558677602*^9, 3.742878649017148*^9, 3.742879295155436*^9, 
  3.786985343139077*^9},
 CellLabel->"Out[1]=",
 CellID->2041059921,ExpressionUUID->"40f37307-9d7d-4179-a3b8-e87e5aa8a74d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"\"\<InterpretElement\>\"", ",", 
   RowBox[{"{", 
    RowBox[{
    "\"\<Ca2+\>\"", ",", "\"\<Ca+2\>\"", ",", "\"\<fe+3\>\"", ",", 
     "\"\<FE3+\>\"", ",", "\"\<k+\>\"", ",", "\"\<K-1\>\""}], "}"}]}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.7379759673880873`*^9, 3.7379759765390673`*^9}, {
  3.737976050091669*^9, 3.737976080988471*^9}, {3.742878569029066*^9, 
  3.742878570135693*^9}, {3.7428792466829233`*^9, 3.742879259195181*^9}, {
  3.78698534589036*^9, 3.7869853489396877`*^9}},
 CellLabel->"In[2]:=",
 CellID->1889735775,ExpressionUUID->"15b3a064-a41a-423f-a1b1-a7708d980798"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"\<\"Ca2+\"\>", ",", "\<\"Ca2+\"\>", ",", "\<\"Fe3+\"\>", 
   ",", "\<\"Fe3+\"\>", ",", "\<\"K1+\"\>", ",", "\<\"K1-\"\>"}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.737976074977096*^9, 3.7379760813854303`*^9}, 
   3.73797612590658*^9, {3.742878560678401*^9, 3.742878577879129*^9}, 
   3.742878649233953*^9, 3.742879259768222*^9, 3.742879295372608*^9, 
   3.786985349824566*^9},
 CellLabel->"Out[2]=",
 CellID->1404914664,ExpressionUUID->"cdf4ce3c-7a4f-41b7-80bd-e0bb7933fc1b"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"\"\<InterpretElement\>\"", ",", "\"\<Fx01\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.7379761015300503`*^9, 3.7379761202320557`*^9}, {
  3.78698535470621*^9, 3.786985356419076*^9}},
 CellLabel->"In[3]:=",
 CellID->2118692029,ExpressionUUID->"97619ab2-dc5c-4729-b7e8-4409d85ec417"],

Cell[BoxData["\<\"F\"\>"], "Output",
 CellChangeTimes->{{3.737976105388864*^9, 3.737976126040214*^9}, 
   3.742878649433844*^9, 3.742879261692822*^9, 3.742879295572098*^9, 
   3.78698535682257*^9},
 CellLabel->"Out[3]=",
 CellID->62486888,ExpressionUUID->"1920b591-b1e5-4177-83fb-29c1316df47b"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{"\"\<InterpretElement\>\"", ",", "\"\<Je2+\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.7379760943860073`*^9, 3.7379760947445*^9}, {
  3.786985359537959*^9, 3.786985361394795*^9}},
 CellLabel->"In[4]:=",
 CellID->334541063,ExpressionUUID->"172704c2-2e80-4016-a0b0-b1a9802c3fb8"],

Cell[BoxData[
 TemplateBox[{
  "InputCheck","ElementError",
   "\"The element \[LeftGuillemet]\\!\\(\\*RowBox[{\\\"\\\\\\\"Je2+\\\\\\\"\\\
\"}]\\)\[RightGuillemet] cannot be interpreted.\"",2,4,7,26775511822436251483,
   "Local","MaXrd`InputCheck"},
  "MessageTemplate2"]], "Message", "MSG",
 CellChangeTimes->{3.737976095363634*^9, 3.737976126168386*^9, 
  3.742878649680561*^9, 3.742879295768867*^9, 3.786985362257333*^9},
 CellLabel->"During evaluation of In[4]:=",
 CellID->432340259,ExpressionUUID->"2f5c556b-c488-42ae-8eef-846cfacd4def"],

Cell[BoxData["$Aborted"], "Output",
 CellChangeTimes->{3.737976095370049*^9, 3.737976126193619*^9, 
  3.742878649720689*^9, 3.742879295810626*^9, 3.786985362280835*^9},
 CellLabel->"Out[4]=",
 CellID->1405555212,ExpressionUUID->"360e4654-e0c9-4c2d-a593-10a01cc6144b"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "bc458324-6ff4-4594-b2dc-cec8f4864e24"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->2081050686,ExpressionUUID->"a4de24e1-d680-405e-ad04-f6f7a919178a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"InputCheck", "[", 
  RowBox[{
  "\"\<GetCrystalFamilyMetric\>\"", ",", "\"\<Hexagonal\>\"", ",", 
   "\"\<2D\>\""}], "]"}]], "Input",
 CellChangeTimes->{{3.779730145562269*^9, 3.779730167803822*^9}},
 CellLabel->"In[1]:=",
 CellID->537426626,ExpressionUUID->"c59db728-6ebb-424e-a415-9f5e900fcdff"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"1.`", ",", 
     RowBox[{"-", "0.5`"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"0.`", ",", "0.8660254037844386`"}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.779730168592024*^9, 3.779730174953472*^9}, 
   3.7869853735895643`*^9},
 CellLabel->"Out[1]=",
 CellID->1199856089,ExpressionUUID->"4dda3ddc-a939-4230-8d28-02a05a3652fd"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "290063b4-1298-4c4f-9272-5293535f5915"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->1593279856,ExpressionUUID->"39d31d1b-d859-419c-b8b4-20df7d1d5bc8"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"domain1", "=", 
  RowBox[{"ConstructDomains", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"7", ",", "7", ",", "1"}], "}"}], ",", "3", ",", "25"}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.782109872025247*^9, 3.782109907465268*^9}, 
   3.782110042824525*^9, {3.786985393698317*^9, 3.7869854227544737`*^9}},
 CellLabel->"In[1]:=",
 CellID->685727073,ExpressionUUID->"8bd5ddce-f3e6-4ef8-9733-0cb6942504f8"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"7", ",", "7", ",", "1"}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
    "1", ",", "1", ",", "2", ",", "2", ",", "2", ",", "2", ",", "3", ",", "1",
      ",", "1", ",", "1", ",", "3", ",", "1", ",", "2", ",", "3", ",", "3", 
     ",", "1", ",", "1", ",", "3", ",", "2", ",", "1", ",", "2", ",", "1", 
     ",", "1", ",", "3", ",", "2", ",", "2", ",", "2", ",", "1", ",", "2", 
     ",", "1", ",", "3", ",", "3", ",", "1", ",", "2", ",", "1", ",", "3", 
     ",", "3", ",", "3", ",", "1", ",", "1", ",", "1", ",", "1", ",", "3", 
     ",", "3", ",", "3", ",", "3", ",", "3", ",", "1", ",", "1"}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.782109907743828*^9, 3.782109915644936*^9}, {
  3.7821100436297197`*^9, 3.782110055323806*^9}, {3.786985390886319*^9, 
  3.786985426335487*^9}},
 CellLabel->"Out[1]=",
 CellID->435726054,ExpressionUUID->"629f92cc-7bdc-41df-90cb-93617f0c9d1d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"R1", "=", 
   RowBox[{"InputCheck", "[", 
    RowBox[{"\"\<RotationTransformation\>\"", ",", "domain1", ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", "\"\<Domain\>\"", ",", 
       
       RowBox[{"<|", 
        RowBox[{"3", "\[Rule]", 
         RowBox[{"23.5", "\[Degree]"}]}], "|>"}]}], "}"}]}], "]"}]}], 
  "\[IndentingNewLine]"}]], "Input",
 CellChangeTimes->{{3.782109857606408*^9, 3.782109866230871*^9}, {
   3.782109937611701*^9, 3.7821099830944633`*^9}, {3.78211002743747*^9, 
   3.7821100486520147`*^9}, 3.7869854246584682`*^9},
 CellLabel->"In[2]:=",
 CellID->324919468,ExpressionUUID->"4b36b02f-4612-4ad4-9f62-a18c3199d740"],

Cell[BoxData["MaXrd`Private`R$4121"], "Output",
 CellChangeTimes->{
  3.7821099833738213`*^9, {3.782110028968766*^9, 3.782110066054872*^9}, {
   3.786985396649992*^9, 3.78698542699706*^9}},
 CellLabel->"Out[2]=",
 CellID->905036467,ExpressionUUID->"4eb6533a-9159-4dc6-bbda-cc67298c43e2"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"R1", "[", "3", "]"}]], "Input",
 CellChangeTimes->{{3.7821099849871807`*^9, 3.7821100321363583`*^9}, 
   3.782110155710752*^9},
 CellLabel->"In[3]:=",
 CellID->2128016662,ExpressionUUID->"b9ad1ba9-3c22-4ac0-aad9-bff1def0b927"],

Cell[BoxData[
 RowBox[{"TransformationFunction", "[", 
  RowBox[{"(", 
   TagBox[GridBox[{
      {"0.917060074385124`", 
       RowBox[{"-", "0.3987490689252462`"}], "0.1658798512297519`"},
      {"0.3987490689252462`", "0.917060074385124`", 
       RowBox[{"-", "0.7974981378504924`"}]},
      {"0", "0", "1.`"}
     },
     AutoDelete->False,
     GridBoxDividers->{
      "Columns" -> {{False}}, "ColumnsIndexed" -> {-2 -> True}, 
       "Rows" -> {{False}}, "RowsIndexed" -> {-2 -> True}},
     GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
    #& ], ")"}], "]"}]], "Output",
 CellChangeTimes->{{3.782109989687169*^9, 3.7821100323584213`*^9}, 
   3.78211006721521*^9, 3.782110156163612*^9, {3.786985399507834*^9, 
   3.786985427821364*^9}},
 CellLabel->"Out[3]=",
 CellID->527829054,ExpressionUUID->"3b65720b-40b5-4f7d-8a59-f0b7a37efc23"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain2", "=", 
   RowBox[{"ConstructDomains", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"7", ",", "7", ",", "7"}], "}"}], ",", "3", ",", "250"}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R2", "=", 
   RowBox[{"InputCheck", "[", 
    RowBox[{"\"\<RotationTransformation\>\"", ",", "domain", ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", "\"\<Unit\>\"", ",", 
       RowBox[{"<|", 
        RowBox[{"1", "\[Rule]", 
         RowBox[{"45", "\[Degree]"}]}], "|>"}]}], "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"R2", "[", 
  RowBox[{"1", ",", 
   RowBox[{"{", 
    RowBox[{"2.5", ",", "3.5"}], "}"}]}], "]"}]}], "Input",
 CellChangeTimes->{{3.7821100742335997`*^9, 3.7821101389680634`*^9}},
 CellLabel->"In[4]:=",
 CellID->1159887342,ExpressionUUID->"58b5f2e2-c1ba-4516-9a3d-9299dc081fa5"],

Cell[BoxData[
 RowBox[{"TransformationFunction", "[", 
  RowBox[{"(", 
   TagBox[GridBox[{
      {"0.7071067811865476`", 
       RowBox[{"-", "0.7071067811865475`"}], "3.207106781186547`"},
      {"0.7071067811865475`", "0.7071067811865476`", 
       RowBox[{"-", "0.7426406871192848`"}]},
      {"0", "0", "1.`"}
     },
     AutoDelete->False,
     GridBoxDividers->{
      "Columns" -> {{False}}, "ColumnsIndexed" -> {-2 -> True}, 
       "Rows" -> {{False}}, "RowsIndexed" -> {-2 -> True}},
     GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
    #& ], ")"}], "]"}]], "Output",
 CellChangeTimes->{{3.782110130960862*^9, 3.782110142553462*^9}, 
   3.7869854386840057`*^9},
 CellLabel->"Out[6]=",
 CellID->883838968,ExpressionUUID->"1717ef9f-a28d-4ef7-a942-95007a1b8721"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\t", "ExampleDelimiter",ExpressionUUID->
   "69f05d7b-4e10-424b-b297-8e97f9331912"],
  $Line = 0; Null]], "ExampleDelimiter",
 CellID->1574356691,ExpressionUUID->"cca9c508-5d6e-4486-9bcc-da2e2af4f833"],

Cell[TextData[{
 "The last parameter specifies whether it is intended for direct space (",
 StyleBox["DIFFUSE",
  FontSlant->"Italic"],
 ") or reciprocal space (",
 StyleBox["DISCUS",
  FontSlant->"Italic"],
 ") reference."
}], "ExampleText",
 CellChangeTimes->{{3.7838018418305902`*^9, 3.7838019014033737`*^9}},
 CellID->704249145,ExpressionUUID->"cfadec37-356d-4dd0-93bf-90c71f9d319a"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{
   "\"\<GetReciprocalImageOrientation\>\"", ",", "\"\<Quartz\>\"", ",", 
    "\"\<hk0\>\"", ",", "7.5", ",", "True"}], "]"}], "//", 
  "TableForm"}]], "Input",
 CellChangeTimes->{{3.7838017017266283`*^9, 3.7838017436954*^9}},
 CellLabel->"In[1]:=",
 CellID->1895227847,ExpressionUUID->"cdc34780-d198-43bb-890d-daba3764a219"],

Cell[BoxData[
 TagBox[
  TagBox[GridBox[{
     {"\<\"  13.6349,     4.9907,  0.\"\>"},
     {"\<\"  13.6349,   -18.6256,  0.,  500\"\>"},
     {"\<\" -13.6349,    18.6256,  0.,  500\"\>"},
     {"\<\"  13.6349,     4.9907,  0.,  1\"\>"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.5599999999999999]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}],
   Column],
  Function[BoxForm`e$, 
   TableForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.7838017309813747`*^9, 3.783801755663938*^9}},
 CellLabel->"Out[1]//TableForm=",
 CellID->284923126,ExpressionUUID->"ff66bad9-d1f7-4154-b730-0d054b6202c2"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{
   "\"\<GetReciprocalImageOrientation\>\"", ",", "\"\<Quartz\>\"", ",", 
    "\"\<hk0\>\"", ",", "7.5", ",", "False"}], "]"}], "//", 
  "TableForm"}]], "Input",
 CellChangeTimes->{{3.7838017017266283`*^9, 3.783801749783167*^9}},
 CellLabel->"In[2]:=",
 CellID->826492967,ExpressionUUID->"2c8735f6-9329-472a-9587-eaa7a5d2b171"],

Cell[BoxData[
 TagBox[
  TagBox[GridBox[{
     {"\<\"  -7.5000,    -7.5000,  0.\"\>"},
     {"\<\"   7.5000,    -7.5000,  0.\"\>"},
     {"\<\"  -7.5000,     7.5000,  0.\"\>"}
    },
    GridBoxAlignment->{
     "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
      "RowsIndexed" -> {}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.5599999999999999]}, 
        Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}, "RowsIndexed" -> {}}],
   Column],
  Function[BoxForm`e$, 
   TableForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.783801750032868*^9, 3.783801756967389*^9}},
 CellLabel->"Out[2]//TableForm=",
 CellID->906336988,ExpressionUUID->"2302491d-9987-422a-ba8a-3654cb574e4f"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "Generalizations & Extensions", "ExampleSection",ExpressionUUID->
   "dd2999a5-ce07-46e5-b7e9-e0eb8e614a9b"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1020263627,ExpressionUUID->"dc89e3eb-0fa8-4aea-be71-c0557c05fecd"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "Options", "ExampleSection",ExpressionUUID->
   "395605df-0302-41b5-aa18-e9d1852d859a"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2061341341,ExpressionUUID->"294ace5b-178b-44eb-948d-0a5b45b96055"],

Cell[BoxData[
 InterpretationBox[Cell[
  "XXXX", "ExampleSubsection",ExpressionUUID->
   "df973ee2-7e39-44f6-a498-5ba3369d677a"],
  $Line = 0; Null]], "ExampleSubsection",
 CellID->1757724783,ExpressionUUID->"0e958035-0e1c-4674-8054-d2569cff9ff6"],

Cell[BoxData[
 InterpretationBox[Cell[
  "XXXX", "ExampleSubsection",ExpressionUUID->
   "6d2331f9-fff2-4283-b26b-cd770255a264"],
  $Line = 0; Null]], "ExampleSubsection",
 CellID->1295379749,ExpressionUUID->"2bedbe77-d0e7-41b5-89aa-cc033f703185"]
}, Closed]],

Cell[BoxData[
 InterpretationBox[Cell[
  "Applications", "ExampleSection",ExpressionUUID->
   "c7aa7264-2c8a-4f1f-827d-6e8c56e25954"],
  $Line = 0; Null]], "ExampleSection",
 CellID->258228157,ExpressionUUID->"8d11c5d5-92af-4b2d-ab64-9a75e73d64d4"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Properties & Relations", "ExampleSection",ExpressionUUID->
   "58fa8cd5-f7b8-4338-877d-9b59ba3764e9"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2123667759,ExpressionUUID->"0a089dea-60a2-4b90-9f38-ed29be39e050"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Possible Issues", "ExampleSection",ExpressionUUID->
   "179cf3a9-93d9-4906-9667-71b61cd8b518"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1305812373,ExpressionUUID->"3cefeac4-125e-4e02-a713-78af05ed4e4b"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Interactive Examples", "ExampleSection",ExpressionUUID->
   "d27a07fc-f47b-42da-9bbf-83cbc16ed394"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1653164318,ExpressionUUID->"859c3c71-7303-4a22-902a-f6507b2d377d"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Neat Examples", "ExampleSection",ExpressionUUID->
   "135e5b89-6d6d-4161-965f-744ab21b5a7f"],
  $Line = 0; Null]], "ExampleSection",
 CellID->589267740,ExpressionUUID->"da3fa7ce-3a1d-4e60-80ea-58ff3f9d1ef3"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[TextData[{
   StyleBox["Mathematica",
    FontSlant->"Italic"],
   " code"
  }], "ExampleSection",ExpressionUUID->"fc5abffe-d72d-4fbb-81ca-8ca607f36c58"],
  $Line = 0; Null]], "ExampleSection",
 CellChangeTimes->{{3.7136105055756683`*^9, 3.713610509942071*^9}},
 CellID->13108794,ExpressionUUID->"d27ab792-63b6-43fc-a7d1-f21dcce82e00"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidLabel"}], "=", 
   "\"\<\[LeftGuillemet]`1`\[RightGuillemet] is not a recognised check label.\
\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidTuple"}], "=", 
   "\"\<Reflections (and coordinates) must be on a {\!\(\*StyleBox[\"h\", \
\"TI\"]\), \!\(\*StyleBox[\"k\", \"TI\"]\), \!\(\*StyleBox[\"l\", \"TI\"]\)} \
(or {\!\(\*StyleBox[\"x\", \"TI\"]\), \!\(\*StyleBox[\"y\", \"TI\"]\), \
\!\(\*StyleBox[\"z\", \"TI\"]\)}) form\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "SingleTupleExpected"}], "=", 
   "\"\<Only one `1` expected.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "IntegerExpected"}], "=", 
   "\"\<One or more indices are not integers.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidInputType"}], "=", 
   "\"\<Head of indices must be either Integer, String or Symbol.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "MultipleTuplesExpected"}], "=", 
    "\"\<At least two reflections are required to make comparisons.\>\""}], 
   ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "EnergyUnitExpected"}], "=", 
   "\"\<Input does not have a unit compatible with energy or \
wavelength.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidEnergyInput"}], "=", 
   "\"\<Input must be an energy or wavelength compatible Quantity, or a \
number.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "EnergyMustBePositive"}], "=", 
    "\"\<The wavelength/energy must be positive.\>\""}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "NotIn$CrystalData"}], "=", 
   "\"\<No data found on \[LeftGuillemet]`1`\[RightGuillemet].\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "NoWavelengthIncluded"}], "=", 
   "\"\<No wavelength was found for crystal \[LeftGuillemet]`1`\
\[RightGuillemet].\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidUserInput"}], "=", 
   "\"\<Invalid user input.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "InvalidPolarisationSetting"}], "=", 
    "\"\<Invalid polarisation setting.\>\""}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidPointOrSpaceGroup"}], "=", 
   "\"\<Unable to interpret \[LeftGuillemet]`1`\[RightGuillemet] as a point- \
or space group.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidPointGroup"}], "=", 
   "\"\<Unable to interpret \[LeftGuillemet]`1`\[RightGuillemet] as a point \
group.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidSpaceGroup"}], "=", 
   "\"\<Unable to interpret \[LeftGuillemet]`1`\[RightGuillemet] as a space \
group.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidSpaceGroupNumber"}], "=", 
   "\"\<Valid space group numbers are between 1 and 230.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidSpaceGroupInCrystal"}], "=", 
   "\"\<Crystal entry \[LeftGuillemet]`1`\[RightGuillemet] has invalid space \
group \[LeftGuillemet]`2`\[RightGuillemet].\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "InvalidSymmetryObject"}], "=", 
    "\"\<Unable to interpret \[LeftGuillemet]`1`\[RightGuillemet] as a point \
group, space group or a crystal.\>\""}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidCentring"}], "=", 
   "\"\<Invalid space group centring.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "ElementNumber"}], "=", 
   "\"\<Element number `1` is out of range.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "ElementFailed"}], "=", 
   "\"\<Unable to interpret \[LeftGuillemet]`1`\[RightGuillemet] as a \
chemical element.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "ElementError"}], "=", 
    "\"\<The element \[LeftGuillemet]`1`\[RightGuillemet] cannot be \
interpreted.\>\""}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidCrystalFamily"}], "=", 
   "\"\<\[LeftGuillemet]`1`\[RightGuillemet] is not a valid crystal family.\>\
\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "InvalidDimension"}], "=", 
    "\"\<Dimension must be either \\\"2D\\\" or \\\"3D\\\".\>\""}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "DomainSizeError"}], "=", 
   "\"\<Discrepancy between given domain size and length.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidRotationPoint"}], "=", 
   "\"\<Invalid rotation point.\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "::", "InvalidRotationReference"}], "=", 
   "\"\<Reference for rotation anchor must either be \\\"Host\\\", \\\"Domain\
\\\", \\\"DomainCentroid\\\" or \\\"Unit\\\".\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"InputCheck", "::", "InvalidRotationMap"}], "=", 
    "\"\<Values of `1`D rotation maps must be `2`.\>\""}], ";"}], 
  "\[IndentingNewLine]", "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"SyntaxInformation", "@", "InputCheck"}], "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"\"\<ArgumentsPattern\>\"", "\[Rule]", 
     RowBox[{"{", "__", "}"}]}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]}], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.6856820263060083`*^9, 3.6856820338793163`*^9}, {
   3.685682083417005*^9, 3.685682092894709*^9}, {3.6856840260308533`*^9, 
   3.685684026178547*^9}, {3.685686819102976*^9, 3.6856868408053513`*^9}, {
   3.685687011142066*^9, 3.685687017829006*^9}, {3.685687131249773*^9, 
   3.685687151398356*^9}, {3.685687183159276*^9, 3.6856871838215933`*^9}, {
   3.685687254295497*^9, 3.685687281286789*^9}, {3.685687660039452*^9, 
   3.6856877115995817`*^9}, {3.68568838863011*^9, 3.6856884381337767`*^9}, {
   3.685690949932845*^9, 3.6856909574232817`*^9}, {3.685691048596792*^9, 
   3.685691065258542*^9}, {3.685691555385049*^9, 3.685691595897393*^9}, {
   3.685693407917099*^9, 3.6856934105491962`*^9}, {3.685693449539488*^9, 
   3.685693464972211*^9}, {3.685693732995039*^9, 3.6856937393916893`*^9}, {
   3.685693867613049*^9, 3.685693870503192*^9}, {3.685694016861869*^9, 
   3.685694053583612*^9}, {3.685694415120605*^9, 3.685694415410471*^9}, {
   3.6856953860999413`*^9, 3.685695404607368*^9}, {3.68569555947088*^9, 
   3.685695605133265*^9}, {3.685696124318612*^9, 3.68569613828201*^9}, {
   3.685696178849712*^9, 3.685696180401723*^9}, {3.685696592780033*^9, 
   3.6856965970349083`*^9}, {3.6870711449669037`*^9, 3.687071165830688*^9}, {
   3.6870725649937353`*^9, 3.687072567422408*^9}, {3.711081329746539*^9, 
   3.711081335862384*^9}, {3.711083709642126*^9, 3.71108372803414*^9}, {
   3.712990896317184*^9, 3.712990899230811*^9}, {3.713603056038671*^9, 
   3.7136030717991047`*^9}, 3.713603337329356*^9, {3.7136034598308163`*^9, 
   3.713603470204297*^9}, {3.713604348937676*^9, 3.71360436129599*^9}, {
   3.717147714818186*^9, 3.717147739983534*^9}, {3.7171480835458517`*^9, 
   3.717148091231995*^9}, {3.726560324583314*^9, 3.7265603577752657`*^9}, {
   3.726853588279467*^9, 3.7268536391946774`*^9}, {3.7271789201847763`*^9, 
   3.727178947159677*^9}, {3.7275066313384666`*^9, 3.72750665317505*^9}, {
   3.727513894430643*^9, 3.727513902461985*^9}, {3.727596618528956*^9, 
   3.727596645209611*^9}, {3.727601483861143*^9, 3.7276014841869497`*^9}, {
   3.7276028953923073`*^9, 3.727602914012473*^9}, {3.728109699712471*^9, 
   3.728109743760724*^9}, {3.728765837392223*^9, 3.728765846807078*^9}, {
   3.7340775949863367`*^9, 3.734077598710491*^9}, {3.7372791075805187`*^9, 
   3.73727914741197*^9}, {3.7372792368998547`*^9, 3.737279256825714*^9}, {
   3.737285569781273*^9, 3.737285603410686*^9}, {3.739187854951786*^9, 
   3.73918785517507*^9}, {3.742016334042914*^9, 3.742016337494812*^9}, {
   3.742016368507223*^9, 3.74201638931714*^9}, {3.7567126007785892`*^9, 
   3.756712616867313*^9}, 3.75671264844755*^9, {3.756712756093667*^9, 
   3.756712764043981*^9}, {3.75671279769972*^9, 3.756712815035034*^9}, {
   3.756713298279908*^9, 3.7567132995556707`*^9}, {3.7791347576669817`*^9, 
   3.779134757825488*^9}, {3.7796213397964487`*^9, 3.7796213411942797`*^9}, {
   3.781861177096654*^9, 3.7818611798947363`*^9}, {3.7818638659283743`*^9, 
   3.78186388273141*^9}, {3.781864125333624*^9, 3.781864154780567*^9}, {
   3.7818642056977167`*^9, 3.781864219490481*^9}, {3.781865551234782*^9, 
   3.781865576031451*^9}, {3.7818656537778378`*^9, 3.781865662184041*^9}, {
   3.781866087341042*^9, 3.781866138388178*^9}, {3.781957515808682*^9, 
   3.781957520990094*^9}, {3.782030887076083*^9, 3.782030887369808*^9}, 
   3.7869545931030684`*^9, 3.7869549247582397`*^9, 3.786955007868844*^9, {
   3.786955074079344*^9, 3.786955101762665*^9}, {3.786955133945662*^9, 
   3.786955161089117*^9}, {3.786955399308937*^9, 3.786955428954468*^9}, {
   3.786955463442379*^9, 3.786955510679736*^9}, {3.786955562839375*^9, 
   3.786955606909911*^9}, 3.786955656525093*^9, {3.786955720347637*^9, 
   3.786955755177781*^9}, {3.786956142290414*^9, 3.786956147840975*^9}, {
   3.7869562148642387`*^9, 3.786956220863571*^9}, {3.7869562601435432`*^9, 
   3.7869562665982647`*^9}, {3.7869563064305763`*^9, 3.786956311021562*^9}, {
   3.786956360525083*^9, 3.786956367533533*^9}},
 CellLabel->"In[732]:=",
 CellID->1391889154,ExpressionUUID->"c03b076a-d5c7-40d6-a76d-04eb0072d1d5"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"input_List", ",", 
    RowBox[{"labels___", "?", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"SubsetQ", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
          "\"\<1hkl\>\"", ",", "\"\<1xyz\>\"", ",", "\"\<Integer\>\"", ",", 
           "\"\<Multiple\>\"", ",", "\"\<StringSymbol\>\"", ",", 
           "\"\<WrapSingle\>\""}], "}"}], ",", 
         RowBox[{"{", "#", "}"}]}], "]"}], "&"}], ")"}]}]}], 
   "\[IndentingNewLine]", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"check", ",", "hkl", ",", "temp"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Check", " ", "labels"}], " ", "*)"}], "\[IndentingNewLine]", 
    "\t", 
    RowBox[{
     RowBox[{"check", "=", 
      RowBox[{"{", "labels", "}"}]}], ";", "\[IndentingNewLine]", "\t", 
     RowBox[{"Do", "[", "\[IndentingNewLine]", "\t", 
      RowBox[{
       RowBox[{
        RowBox[{"temp", "=", 
         RowBox[{
         "check", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], 
        ";", "\[IndentingNewLine]", "\t", 
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{"!", 
           RowBox[{"MemberQ", "[", 
            RowBox[{
             RowBox[{"{", "\[IndentingNewLine]", 
              RowBox[{
              "\"\<1hkl\>\"", ",", "\"\<1xyz\>\"", ",", "\"\<Integer\>\"", 
               ",", "\"\<Multiple\>\"", ",", "\[IndentingNewLine]", 
               "\"\<StringSymbol\>\"", ",", "\"\<WrapSingle\>\""}], "}"}], 
             ",", "temp"}], "]"}]}], ",", "\[IndentingNewLine]", "\t", 
          RowBox[{
           RowBox[{"Message", "[", 
            RowBox[{
             RowBox[{"InputCheck", "::", "InvalidLabel"}], ",", "temp"}], 
            "]"}], ";", 
           RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"{", 
        RowBox[{"i", ",", 
         RowBox[{"Length", "@", "check"}]}], "}"}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Dimensions", " ", "check", " ", 
       RowBox[{"(", 
        RowBox[{"always", " ", "required"}], ")"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"Which", "[", "\[IndentingNewLine]", "\t", 
      RowBox[{"(*", " ", 
       RowBox[{"Single", " ", 
        RowBox[{"reflection", "/", "coordinate"}]}], " ", "*)"}], 
      "\[IndentingNewLine]", "\t", 
      RowBox[{
       RowBox[{"MatchQ", "[", 
        RowBox[{"input", ",", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"x1_", ",", "x2_", ",", "x3_"}], "}"}], "/;", 
          RowBox[{"!", 
           RowBox[{"AnyTrue", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"x1", ",", "x2", ",", "x3"}], "}"}], ",", "ListQ"}], 
            "]"}]}]}]}], "]"}], ",", "\[IndentingNewLine]", "\t\t", 
       RowBox[{"hkl", "=", 
        RowBox[{"{", "input", "}"}]}], ",", "\[IndentingNewLine]", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"(*", " ", 
        RowBox[{"Multiple", " ", 
         RowBox[{"reflections", "/", "coordinates"}]}], " ", "*)"}], 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"AllTrue", "[", 
        RowBox[{"input", ",", "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"MatchQ", "[", 
           RowBox[{"#", ",", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"x1_", ",", "x2_", ",", "x3_"}], "}"}], "/;", 
             RowBox[{"!", 
              RowBox[{"AnyTrue", "[", 
               RowBox[{
                RowBox[{"{", 
                 RowBox[{"x1", ",", "x2", ",", "x3"}], "}"}], ",", "ListQ"}], 
               "]"}]}]}]}], "]"}], "&"}]}], "]"}], ",", "\[IndentingNewLine]",
        "\t\t", 
       RowBox[{"hkl", "=", "input"}], ",", "\[IndentingNewLine]", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"(*", " ", 
        RowBox[{"None", " ", "of", " ", "the", " ", "above"}], " ", "*)"}], 
       "\[IndentingNewLine]", "\t", "True", ",", "\[IndentingNewLine]", 
       "\t\t", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"InputCheck", "::", "InvalidTuple"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "\[IndentingNewLine]", "\t", "]"}], 
     ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Single", " ", 
       RowBox[{"reflection", "/", "coordinates"}], " ", "check"}], " ", 
      "*)"}], "\[IndentingNewLine]", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"check", ",", "\"\<1hkl\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Length", "@", "hkl"}], "\[NotEqual]", "1"}], ",", 
         "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{
            RowBox[{"InputCheck", "::", "SingleTupleExpected"}], ",", 
            "\"\<reflection\>\""}], "]"}], ";", "\[IndentingNewLine]", "\t", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "\t", "]"}], ";", "\[IndentingNewLine]", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"check", ",", "\"\<1xyz\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Length", "@", "hkl"}], "\[NotEqual]", "1"}], ",", 
         "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{
            RowBox[{"InputCheck", "::", "SingleTupleExpected"}], ",", 
            "\"\<coordinate\>\""}], "]"}], ";", "\[IndentingNewLine]", "\t", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "\t", "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Multiple", " ", "reflections", " ", "check"}], " ", "*)"}], 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"check", ",", "\"\<Multiple\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"Length", "@", "hkl"}], "<", "2"}], ",", 
         "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{"InputCheck", "::", "MultipleTuplesExpected"}], "]"}], ";",
           "\[IndentingNewLine]", "\t", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "\t", "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Integer", " ", "check"}], " ", "*)"}], "\[IndentingNewLine]", 
     "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"check", ",", "\"\<Integer\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"!", 
          RowBox[{"AllTrue", "[", 
           RowBox[{
            RowBox[{"Flatten", "@", "hkl"}], ",", "IntegerQ"}], "]"}]}], ",", 
         "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{"InputCheck", "::", "IntegerExpected"}], "]"}], ";", 
          "\[IndentingNewLine]", "\t", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "\t", "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"Check", " ", "if", " ", "Integer"}], ",", " ", 
       RowBox[{"String", " ", "or", " ", "Symbol"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"check", ",", "\"\<StringSymbol\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"!", 
          RowBox[{"ContainsAll", "[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"Integer", ",", "String", ",", "Symbol", ",", "Times"}], 
             "}"}], ",", "\[IndentingNewLine]", "\t", 
            RowBox[{"Head", "/@", 
             RowBox[{"Flatten", "@", "hkl"}]}]}], "]"}]}], ",", 
         "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{"InputCheck", "::", "InvalidInputType"}], "]"}], ";", 
          "\[IndentingNewLine]", "\t", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "\t", "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Wrap", " ", "single", " ", "reflections"}], " ", "*)"}], 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"check", ",", "\"\<WrapSingle\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", "\t", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"MatchQ", "[", 
          RowBox[{"input", ",", "\[IndentingNewLine]", "\t", 
           RowBox[{"{", 
            RowBox[{
             RowBox[{"_", "?", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{"!", 
                 RowBox[{"ListQ", "[", "#", "]"}]}], "&"}], ")"}]}], ",", 
             RowBox[{"_", "?", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{"!", 
                 RowBox[{"ListQ", "[", "#", "]"}]}], "&"}], ")"}]}], ",", 
             RowBox[{"_", "?", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{"!", 
                 RowBox[{"ListQ", "[", "#", "]"}]}], "&"}], ")"}]}]}], 
            "}"}]}], "]"}], ",", "\[IndentingNewLine]", "\t", 
         RowBox[{"Return", "[", 
          RowBox[{"{", "input", "}"}], "]"}], ",", "\[IndentingNewLine]", 
         "\t", 
         RowBox[{"Return", "[", "input", "]"}]}], "\[IndentingNewLine]", "\t",
         "]"}]}], "\[IndentingNewLine]", "\t", "]"}]}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.685682044952615*^9, 3.6856820504144278`*^9}, {
   3.685682141325856*^9, 3.685682178024384*^9}, {3.685682225953554*^9, 
   3.6856822264375687`*^9}, {3.685686504590041*^9, 3.685686563672072*^9}, {
   3.685686761317539*^9, 3.685686935927103*^9}, {3.685687049738576*^9, 
   3.68568707333384*^9}, {3.685687114646472*^9, 3.685687127702293*^9}, {
   3.685687165179854*^9, 3.685687166128426*^9}, {3.685687209773357*^9, 
   3.685687249125226*^9}, {3.685687460267198*^9, 3.6856874715285482`*^9}, {
   3.685687503903227*^9, 3.6856876526267977`*^9}, {3.685687717427792*^9, 
   3.685687802476377*^9}, {3.685687865524221*^9, 3.685687897331867*^9}, {
   3.685687934255664*^9, 3.685687939417481*^9}, {3.6856879800139227`*^9, 
   3.685688042911214*^9}, {3.68568810006351*^9, 3.685688100318913*^9}, {
   3.685688139025612*^9, 3.6856882052098713`*^9}, {3.685688250205721*^9, 
   3.6856882678366337`*^9}, {3.685688304145129*^9, 3.6856883808922367`*^9}, {
   3.68568844499587*^9, 3.685688472248145*^9}, {3.685688514296632*^9, 
   3.685688545376317*^9}, {3.685688623890478*^9, 3.685688637817067*^9}, {
   3.68569066960983*^9, 3.685690691012197*^9}, {3.685690794783538*^9, 
   3.685690811559473*^9}, {3.68569087238955*^9, 3.685690900780208*^9}, {
   3.685690968591786*^9, 3.6856909827333717`*^9}, 3.685691129301629*^9, {
   3.685691194063245*^9, 3.685691195923958*^9}, {3.685691253520686*^9, 
   3.68569125544692*^9}, {3.685691421918008*^9, 3.68569146953458*^9}, {
   3.685691551850884*^9, 3.685691552213007*^9}, {3.6856916027158012`*^9, 
   3.685691692759995*^9}, {3.685691853134893*^9, 3.685691920007518*^9}, {
   3.6856929678967247`*^9, 3.685693015099309*^9}, 3.6856931484132357`*^9, {
   3.685693393496571*^9, 3.685693394198283*^9}, {3.685693546697781*^9, 
   3.6856935520440397`*^9}, {3.685693609535673*^9, 3.6856936897957973`*^9}, {
   3.685693750984054*^9, 3.685693759315776*^9}, {3.68569392361819*^9, 
   3.685693945319812*^9}, {3.6856939801033173`*^9, 3.685693980425994*^9}, {
   3.685694067633998*^9, 3.685694097770274*^9}, {3.6856942382554502`*^9, 
   3.685694255076212*^9}, {3.6856943006813087`*^9, 3.6856943018640337`*^9}, {
   3.6856943997277603`*^9, 3.685694411106454*^9}, {3.685695339182644*^9, 
   3.685695373223888*^9}, {3.685695408676928*^9, 3.685695478096266*^9}, {
   3.685695766537468*^9, 3.6856957943793716`*^9}, {3.6856958338041162`*^9, 
   3.6856958424484253`*^9}, {3.685696332725561*^9, 3.685696396128811*^9}, {
   3.685696608524857*^9, 3.685696657721571*^9}, {3.6856972409963093`*^9, 
   3.685697244163583*^9}, {3.6856979286350107`*^9, 3.685697955135551*^9}, {
   3.6856979888912783`*^9, 3.685698003991218*^9}, {3.6856982147010527`*^9, 
   3.685698274805579*^9}, {3.685698569424312*^9, 3.685698603461879*^9}, {
   3.68577042313544*^9, 3.685770436557921*^9}, {3.685786249680023*^9, 
   3.6857862528214617`*^9}, {3.687070782983131*^9, 3.687070826316058*^9}, {
   3.711080493388452*^9, 3.711080530269607*^9}, {3.7110838434149733`*^9, 
   3.711083844960722*^9}, {3.712990600076755*^9, 3.712990608318782*^9}, {
   3.712990804480831*^9, 3.7129908060016212`*^9}, {3.712990947248521*^9, 
   3.712990947808515*^9}, {3.713510243799721*^9, 3.7135102514986553`*^9}, {
   3.713510288538774*^9, 3.713510293259116*^9}, {3.7135103372502947`*^9, 
   3.713510338184915*^9}, {3.71431192571665*^9, 3.7143119392365303`*^9}, {
   3.7143120972494097`*^9, 3.714312097447524*^9}, {3.7143121915742683`*^9, 
   3.7143122110300217`*^9}, {3.714312273573138*^9, 3.714312308114839*^9}, {
   3.71445784032449*^9, 3.714457847602706*^9}, 3.714458049967931*^9, {
   3.7147109057397537`*^9, 3.714710909787726*^9}, {3.714710945019298*^9, 
   3.714710963965468*^9}, {3.717143871479184*^9, 3.717143873754469*^9}, {
   3.717146708601173*^9, 3.717146713501816*^9}, {3.717147467353772*^9, 
   3.717147472518999*^9}, {3.717147554646175*^9, 3.717147555923188*^9}, {
   3.717147595628448*^9, 3.717147596128397*^9}, 3.7171476872925243`*^9, {
   3.717147790297018*^9, 3.7171478112554407`*^9}, {3.7171480444680862`*^9, 
   3.717148048818454*^9}, {3.7171482182403383`*^9, 3.7171482183828487`*^9}, {
   3.717148818843635*^9, 3.717148834361803*^9}, {3.7171489319542913`*^9, 
   3.717148951600135*^9}, {3.717149178012879*^9, 3.71714919115486*^9}, {
   3.717149260050128*^9, 3.717149280072538*^9}, {3.717149333315688*^9, 
   3.717149397350493*^9}, {3.717149552908246*^9, 3.7171495813302383`*^9}, {
   3.718521630559267*^9, 3.718521641789692*^9}, {3.7185216726962433`*^9, 
   3.7185216733580647`*^9}, {3.718636471385057*^9, 3.7186364749898767`*^9}, {
   3.7186366347963343`*^9, 3.718636636271434*^9}, {3.7259581138852463`*^9, 
   3.725958115603722*^9}, {3.7372783098194*^9, 3.737278316869255*^9}, 
   3.737371806626379*^9, 3.737384013131838*^9, {3.7373840435457*^9, 
   3.7373840851194687`*^9}, {3.737384137351205*^9, 3.73738418240597*^9}, {
   3.7373842155798798`*^9, 3.737384232171645*^9}, {3.737384415256804*^9, 
   3.737384433510865*^9}, {3.75852996982882*^9, 3.758529971762226*^9}, 
   3.7627930936957808`*^9, {3.786954584256233*^9, 3.786954589718793*^9}, {
   3.786954913336426*^9, 3.786954919895287*^9}, {3.78695501065422*^9, 
   3.7869550144384604`*^9}, {3.786955074082953*^9, 3.786955090281755*^9}, {
   3.7869551207236137`*^9, 3.786955157090266*^9}, {3.786961588352356*^9, 
   3.7869615908880243`*^9}, {3.786961866658291*^9, 3.786961876697589*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[763]:=",
 CellID->941644507,ExpressionUUID->"554eb433-209f-41d2-bf17-a537b8f0a5c1"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<CrystalQ\>\"", ",", "input_"}], "]"}], ":=", 
  RowBox[{"(", "\[IndentingNewLine]", 
   RowBox[{"(*", " ", 
    RowBox[{"Check", " ", "if", " ", "entry", " ", "exists", " ", 
     RowBox[{"in", " ", "'"}], 
     RowBox[{"$CrystalData", "'"}]}], " ", "*)"}], "\[IndentingNewLine]", 
   RowBox[{"If", "[", 
    RowBox[{
     RowBox[{"MissingQ", "@", 
      RowBox[{"$CrystalData", "[", "input", "]"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Message", "[", 
       RowBox[{
        RowBox[{"InputCheck", "::", "NotIn$CrystalData"}], ",", "input"}], 
       "]"}], ";", 
      RowBox[{"Abort", "[", "]"}]}]}], "]"}], "\[IndentingNewLine]", 
   ")"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609703542757*^9}, 3.713609761205812*^9, {
   3.714456648703538*^9, 3.7144566607405*^9}, {3.714462761679092*^9, 
   3.714462774005431*^9}, {3.7144628807577868`*^9, 3.714462892938987*^9}, {
   3.714711288174638*^9, 3.7147112901418753`*^9}, {3.717740904496645*^9, 
   3.71774090450635*^9}, 3.725958197232127*^9, {3.7276035463522577`*^9, 
   3.72760354706783*^9}, {3.74556825639723*^9, 3.7455682923534517`*^9}, {
   3.745568690840042*^9, 3.745568699006835*^9}, 3.7820474980874853`*^9, {
   3.7869555468961906`*^9, 3.786955551854266*^9}, {3.7869616322927837`*^9, 
   3.7869616350531397`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[764]:=",
 CellID->1412234406,ExpressionUUID->"2c76902b-4762-4c2c-add2-65b46e36694c"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<GetCentringVectors\>\"", ",", "centring_String"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "vectors", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Which", "[", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"centring", "===", "\"\<P\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", "}"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<F\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "/", "2"}], ",", 
            RowBox[{"1", "/", "2"}], ",", "0"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"0", ",", 
            RowBox[{"1", "/", "2"}], ",", 
            RowBox[{"1", "/", "2"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "/", "2"}], ",", "0", ",", 
            RowBox[{"1", "/", "2"}]}], "}"}]}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<I\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "2"}], ",", 
           RowBox[{"1", "/", "2"}], ",", 
           RowBox[{"1", "/", "2"}]}], "}"}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<R\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"2", "/", "3"}], ",", 
            RowBox[{"1", "/", "3"}], ",", 
            RowBox[{"1", "/", "3"}]}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "/", "3"}], ",", 
            RowBox[{"2", "/", "3"}], ",", 
            RowBox[{"2", "/", "3"}]}], "}"}]}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<A\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{"{", 
          RowBox[{"0", ",", 
           RowBox[{"1", "/", "2"}], ",", 
           RowBox[{"1", "/", "2"}]}], "}"}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<B\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "2"}], ",", "0", ",", 
           RowBox[{"1", "/", "2"}]}], "}"}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<C\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{"{", 
          RowBox[{
           RowBox[{"1", "/", "2"}], ",", 
           RowBox[{"1", "/", "2"}], ",", "0"}], "}"}], "}"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"centring", "===", "\"\<H\>\""}], ",", 
       RowBox[{"vectors", "=", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"2", "/", "3"}], ",", 
            RowBox[{"1", "/", "3"}], ",", "0"}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{"1", "/", "3"}], ",", 
            RowBox[{"2", "/", "3"}], ",", "0"}], "}"}]}], "}"}]}], ",", 
       "\[IndentingNewLine]", "True", ",", "\[IndentingNewLine]", "\t", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"InputCheck", "::", "InvalidCentring"}], "]"}], ";", 
        "\[IndentingNewLine]", "\t", 
        RowBox[{"Abort", "[", "]"}], ";"}]}], "\[IndentingNewLine]", "]"}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"PrependTo", "[", 
      RowBox[{"vectors", ",", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "]"}]}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609766629499*^9}, {3.713609803694686*^9, 
   3.7136098460035143`*^9}, {3.713609896764085*^9, 3.7136098971713457`*^9}, 
   3.7143124623172703`*^9, {3.714711400201912*^9, 3.7147114013487253`*^9}, {
   3.7177409045433407`*^9, 3.7177409045530024`*^9}, {3.7265604536850843`*^9, 
   3.7265604571899033`*^9}, 3.726561476915771*^9, {3.727603738644006*^9, 
   3.727603738970872*^9}, {3.727603872991158*^9, 3.7276038737620068`*^9}, 
   3.727675395188451*^9, {3.728765707484078*^9, 3.728765708834387*^9}, {
   3.728765780634018*^9, 3.728765813592382*^9}, {3.72876589943944*^9, 
   3.728765908688555*^9}, {3.730017879620852*^9, 3.730017885274577*^9}, {
   3.734077376632456*^9, 3.734077480964463*^9}, {3.734412586131454*^9, 
   3.7344125991220827`*^9}, 3.762793093706504*^9, 3.786956374957906*^9, {
   3.786961889887927*^9, 3.7869618920559807`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[765]:=",
 CellID->1434394998,ExpressionUUID->"80692ab8-e439-431f-9266-7e92ecff654c"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{
   "\"\<GetCrystalFamilyMetric\>\"", ",", "family_", ",", "dimension_"}], 
   "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "M", ",", "a", ",", "b", ",", "c", ",", "\[Alpha]", ",", "\[Beta]", ",", 
      "\[Gamma]"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Input", " ", "checks"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MemberQ", "[", 
         RowBox[{
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
           "\"\<Cubic\>\"", ",", "\"\<Hexagonal\>\"", ",", 
            "\"\<Tetragonal\>\"", ",", "\"\<Orthorhombic\>\"", ",", 
            "\"\<Monoclinic\>\"", ",", "\"\<Triclinic\>\""}], "}"}], ",", 
          "\[IndentingNewLine]", "family"}], "]"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"InputCheck", "::", "InvalidCrystalFamily"}], ",", 
          "family"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MemberQ", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"\"\<2D\>\"", ",", "\"\<3D\>\""}], "}"}], ",", 
          "dimension"}], "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"InputCheck", "::", "InvalidDimension"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", "Metric", " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"M", "=", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"{", 
         RowBox[{"1", ",", 
          RowBox[{"b", " ", 
           RowBox[{"Cos", "[", "\[Gamma]", "]"}]}], ",", 
          RowBox[{"c", " ", 
           RowBox[{"Cos", "[", "\[Beta]", "]"}]}]}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", 
          RowBox[{"b", " ", 
           RowBox[{"Sin", "[", "\[Gamma]", "]"}]}], ",", 
          RowBox[{"c", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"Cos", "[", "\[Alpha]", "]"}], "-", 
             RowBox[{
              RowBox[{"Cos", "[", "\[Beta]", "]"}], " ", 
              RowBox[{"Cos", "[", "\[Gamma]", "]"}]}]}], ")"}], " ", 
           RowBox[{"Csc", "[", "\[Gamma]", "]"}]}]}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{"0", ",", "0", ",", 
          RowBox[{"c", " ", "*", 
           RowBox[{"Sqrt", "[", 
            RowBox[{"1", "-", 
             SuperscriptBox[
              RowBox[{"Cos", "[", "\[Beta]", "]"}], "2"], "-", 
             RowBox[{
              SuperscriptBox[
               RowBox[{"(", 
                RowBox[{
                 RowBox[{"Cos", "[", "\[Alpha]", "]"}], "-", 
                 RowBox[{
                  RowBox[{"Cos", "[", "\[Beta]", "]"}], " ", 
                  RowBox[{"Cos", "[", "\[Gamma]", "]"}]}]}], ")"}], "2"], " ", 
              SuperscriptBox[
               RowBox[{"Csc", "[", "\[Gamma]", "]"}], "2"]}]}], "]"}]}]}], 
         "}"}]}], "}"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     
     RowBox[{"M", "=", 
      RowBox[{"N", "[", 
       RowBox[{"M", "/.", 
        RowBox[{"Which", "[", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"family", "===", "\"\<Cubic\>\""}], ",", 
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"a", "\[Rule]", "1."}], ",", 
            RowBox[{"b", "\[Rule]", "1."}], ",", 
            RowBox[{"c", "\[Rule]", "1."}], ",", "\[IndentingNewLine]", 
            RowBox[{"\[Alpha]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Beta]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Gamma]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}]}], "\[IndentingNewLine]", "}"}], 
          ",", "\[IndentingNewLine]", 
          RowBox[{"family", "===", "\"\<Hexagonal\>\""}], ",", 
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"a", "\[Rule]", "1."}], ",", 
            RowBox[{"b", "\[Rule]", "1."}], ",", 
            RowBox[{"c", "\[Rule]", "1."}], ",", "\[IndentingNewLine]", 
            RowBox[{"\[Alpha]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Beta]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Gamma]", "\[Rule]", 
             RowBox[{"120", "\[Degree]"}]}]}], "\[IndentingNewLine]", "}"}], 
          ",", "\[IndentingNewLine]", 
          RowBox[{"family", "===", "\"\<Tetragonal\>\""}], ",", 
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"a", "\[Rule]", "1."}], ",", 
            RowBox[{"b", "\[Rule]", "1."}], ",", 
            RowBox[{"c", "\[Rule]", "1.61803"}], ",", "\[IndentingNewLine]", 
            RowBox[{"\[Alpha]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Beta]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Gamma]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}]}], "\[IndentingNewLine]", "}"}], 
          ",", "\[IndentingNewLine]", 
          RowBox[{"family", "===", "\"\<Orthorhombic\>\""}], ",", 
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"a", "\[Rule]", "1.7"}], ",", 
            RowBox[{"b", "\[Rule]", "1.2"}], ",", 
            RowBox[{"c", "\[Rule]", "0.85"}], ",", "\[IndentingNewLine]", 
            RowBox[{"\[Alpha]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Beta]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Gamma]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}]}], "\[IndentingNewLine]", "}"}], 
          ",", "\[IndentingNewLine]", 
          RowBox[{"family", "===", "\"\<Monoclinic\>\""}], ",", 
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"a", "\[Rule]", "1."}], ",", 
            RowBox[{"b", "\[Rule]", "0.7"}], ",", 
            RowBox[{"c", "\[Rule]", "1.2"}], ",", "\[IndentingNewLine]", 
            RowBox[{"\[Alpha]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}], ",", 
            RowBox[{"\[Beta]", "\[Rule]", 
             RowBox[{"72.", "\[Degree]"}]}], ",", 
            RowBox[{"\[Gamma]", "\[Rule]", 
             RowBox[{"90", "\[Degree]"}]}]}], "\[IndentingNewLine]", "}"}], 
          ",", "\[IndentingNewLine]", 
          RowBox[{"family", "===", "\"\<Triclinic\>\""}], ",", 
          RowBox[{"{", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"a", "\[Rule]", "1.3"}], ",", 
            RowBox[{"b", "\[Rule]", "0.8"}], ",", 
            RowBox[{"c", "\[Rule]", "0.9"}], ",", "\[IndentingNewLine]", 
            RowBox[{"\[Alpha]", "\[Rule]", 
             RowBox[{"66.", "\[Degree]"}]}], ",", 
            RowBox[{"\[Beta]", "\[Rule]", 
             RowBox[{"77.", "\[Degree]"}]}], ",", 
            RowBox[{"\[Gamma]", "\[Rule]", 
             RowBox[{"88.", "\[Degree]"}]}]}], "\[IndentingNewLine]", "}"}]}],
          "\[IndentingNewLine]", "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"dimension", "===", "\"\<2D\>\""}], ",", 
       RowBox[{"M", "\[LeftDoubleBracket]", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}]}], "\[RightDoubleBracket]"}], ",", 
       "M"}], "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.685682044952615*^9, 3.6856820504144278`*^9}, {
   3.685682141325856*^9, 3.685682178024384*^9}, {3.685682225953554*^9, 
   3.6856822264375687`*^9}, {3.685686504590041*^9, 3.685686563672072*^9}, {
   3.685686761317539*^9, 3.685686935927103*^9}, {3.685687049738576*^9, 
   3.68568707333384*^9}, {3.685687114646472*^9, 3.685687127702293*^9}, {
   3.685687165179854*^9, 3.685687166128426*^9}, {3.685687209773357*^9, 
   3.685687249125226*^9}, {3.685687460267198*^9, 3.6856874715285482`*^9}, {
   3.685687503903227*^9, 3.6856876526267977`*^9}, {3.685687717427792*^9, 
   3.685687802476377*^9}, {3.685687865524221*^9, 3.685687897331867*^9}, {
   3.685687934255664*^9, 3.685687939417481*^9}, {3.6856879800139227`*^9, 
   3.685688042911214*^9}, {3.68568810006351*^9, 3.685688100318913*^9}, {
   3.685688139025612*^9, 3.6856882052098713`*^9}, {3.685688250205721*^9, 
   3.6856882678366337`*^9}, {3.685688304145129*^9, 3.6856883808922367`*^9}, {
   3.68568844499587*^9, 3.685688472248145*^9}, {3.685688514296632*^9, 
   3.685688545376317*^9}, {3.685688623890478*^9, 3.685688637817067*^9}, {
   3.68569066960983*^9, 3.685690691012197*^9}, {3.685690794783538*^9, 
   3.685690811559473*^9}, {3.68569087238955*^9, 3.685690900780208*^9}, {
   3.685690968591786*^9, 3.6856909827333717`*^9}, 3.685691129301629*^9, {
   3.685691194063245*^9, 3.685691195923958*^9}, {3.685691253520686*^9, 
   3.68569125544692*^9}, {3.685691421918008*^9, 3.68569146953458*^9}, {
   3.685691551850884*^9, 3.685691552213007*^9}, {3.6856916027158012`*^9, 
   3.685691692759995*^9}, {3.685691853134893*^9, 3.685691920007518*^9}, {
   3.6856929678967247`*^9, 3.685693015099309*^9}, 3.6856931484132357`*^9, {
   3.685693393496571*^9, 3.685693394198283*^9}, {3.685693546697781*^9, 
   3.6856935520440397`*^9}, {3.685693609535673*^9, 3.6856936897957973`*^9}, {
   3.685693750984054*^9, 3.685693759315776*^9}, {3.68569392361819*^9, 
   3.685693945319812*^9}, {3.6856939801033173`*^9, 3.685693980425994*^9}, {
   3.685694067633998*^9, 3.685694097770274*^9}, {3.6856942382554502`*^9, 
   3.685694255076212*^9}, {3.6856943006813087`*^9, 3.6856943018640337`*^9}, {
   3.6856943997277603`*^9, 3.685694411106454*^9}, {3.685695339182644*^9, 
   3.685695373223888*^9}, {3.685695408676928*^9, 3.685695478096266*^9}, {
   3.685695766537468*^9, 3.6856957943793716`*^9}, {3.6856958338041162`*^9, 
   3.6856958424484253`*^9}, {3.685696332725561*^9, 3.685696396128811*^9}, {
   3.685696608524857*^9, 3.685696657721571*^9}, {3.6856972409963093`*^9, 
   3.685697244163583*^9}, {3.6856979286350107`*^9, 3.685697955135551*^9}, {
   3.6856979888912783`*^9, 3.685698003991218*^9}, {3.6856982147010527`*^9, 
   3.685698274805579*^9}, {3.685698569424312*^9, 3.685698603461879*^9}, {
   3.68577042313544*^9, 3.685770436557921*^9}, {3.685786249680023*^9, 
   3.6857862528214617`*^9}, {3.687070782983131*^9, 3.687070826316058*^9}, {
   3.711080493388452*^9, 3.711080530269607*^9}, {3.7110838434149733`*^9, 
   3.711083844960722*^9}, {3.712990600076755*^9, 3.712990608318782*^9}, {
   3.712990804480831*^9, 3.7129908060016212`*^9}, {3.712990947248521*^9, 
   3.712990947808515*^9}, {3.713510243799721*^9, 3.7135102514986553`*^9}, {
   3.713510288538774*^9, 3.713510293259116*^9}, {3.7135103372502947`*^9, 
   3.713510338184915*^9}, {3.71431192571665*^9, 3.7143119392365303`*^9}, {
   3.7143120972494097`*^9, 3.714312097447524*^9}, {3.7143121915742683`*^9, 
   3.7143122110300217`*^9}, {3.714312273573138*^9, 3.714312308114839*^9}, {
   3.71445784032449*^9, 3.714457847602706*^9}, 3.714458049967931*^9, {
   3.7147109057397537`*^9, 3.714710909787726*^9}, {3.714710945019298*^9, 
   3.714710963965468*^9}, {3.717143871479184*^9, 3.717143873754469*^9}, {
   3.717146708601173*^9, 3.717146713501816*^9}, {3.717147467353772*^9, 
   3.717147472518999*^9}, {3.717147554646175*^9, 3.717147555923188*^9}, {
   3.717147595628448*^9, 3.717147596128397*^9}, 3.7171476872925243`*^9, {
   3.717147790297018*^9, 3.7171478112554407`*^9}, {3.7171480444680862`*^9, 
   3.717148048818454*^9}, {3.7171482182403383`*^9, 3.7171482183828487`*^9}, {
   3.717148818843635*^9, 3.717148834361803*^9}, {3.7171489319542913`*^9, 
   3.717148951600135*^9}, {3.717149178012879*^9, 3.71714919115486*^9}, {
   3.717149260050128*^9, 3.717149280072538*^9}, {3.717149333315688*^9, 
   3.717149397350493*^9}, {3.717149552908246*^9, 3.7171495813302383`*^9}, {
   3.718521630559267*^9, 3.718521641789692*^9}, {3.7185216726962433`*^9, 
   3.7185216733580647`*^9}, {3.718636471385057*^9, 3.7186364749898767`*^9}, {
   3.7186366347963343`*^9, 3.718636636271434*^9}, {3.7259581138852463`*^9, 
   3.725958115603722*^9}, {3.7372783098194*^9, 3.737278316869255*^9}, 
   3.737371806626379*^9, 3.737384013131838*^9, {3.7373840435457*^9, 
   3.7373840851194687`*^9}, {3.737384137351205*^9, 3.73738418240597*^9}, {
   3.7373842155798798`*^9, 3.737384232171645*^9}, {3.737384415256804*^9, 
   3.737384433510865*^9}, {3.75852996982882*^9, 3.758529971762226*^9}, 
   3.7627930936957808`*^9, 3.779621383606275*^9, {3.779623655366046*^9, 
   3.7796236628541946`*^9}, {3.7796237819756413`*^9, 3.7796238196668234`*^9}},
 
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[766]:=",
 CellID->225310164,ExpressionUUID->"89c28393-f736-463a-b54c-35d4a9f923d0"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<GetCrystalFormulaUnits\>\"", ",", "input_String"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "output", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Check", " ", "if", " ", "crystal", " ", "entry", " ", "exists"}], " ", 
     "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"InputCheck", "[", 
      RowBox[{"\"\<CrystalQ\>\"", ",", "input"}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Return", " ", "crystal", " ", "wavelength", " ", "if", " ", 
       "attached"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"KeyExistsQ", "[", 
        RowBox[{
         RowBox[{"$CrystalData", "[", "input", "]"}], ",", 
         "\"\<FormulaUnits\>\""}], "]"}], ",", "\[IndentingNewLine]", 
       RowBox[{"$CrystalData", "[", 
        RowBox[{"input", ",", "\"\<FormulaUnits\>\""}], "]"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"(*", " ", 
        RowBox[{
         RowBox[{"If", " ", "not"}], ",", " ", 
         RowBox[{"query", " ", "user", " ", "manually"}]}], " ", "*)"}], 
       "\[IndentingNewLine]", 
       RowBox[{"output", "=", 
        RowBox[{"ToExpression", "@", 
         RowBox[{"InputString", "[", "\[IndentingNewLine]", 
          RowBox[{
          "\"\<Cannot determine the number of formula units \>\"", "<>", 
           "\[IndentingNewLine]", "\"\<for \[LeftGuillemet]\>\"", "<>", 
           "input", "<>", "\"\<\[RightGuillemet].\>\"", "<>", "\"\<\\n\>\"", "<>",
            "\[IndentingNewLine]", 
           "\"\<Please enter that number or the density below.\>\""}], 
          "]"}]}]}]}], "\[IndentingNewLine]", "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"NumericQ", "@", "output"}]}], ",", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"InputCheck", "::", "InvalidUserInput"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}], ",", "\[IndentingNewLine]", "output"}],
       "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609703542757*^9}, 3.713609761205812*^9, {
   3.714456648703538*^9, 3.7144566607405*^9}, {3.714462761679092*^9, 
   3.714462774005431*^9}, {3.7144628807577868`*^9, 3.714462892938987*^9}, {
   3.714711288174638*^9, 3.7147112901418753`*^9}, {3.717740904496645*^9, 
   3.71774090450635*^9}, 3.725958197232127*^9, {3.727178717966507*^9, 
   3.727178721188702*^9}, {3.727178758964155*^9, 3.727178761323883*^9}, {
   3.727178860595625*^9, 3.727178901192408*^9}, {3.727178964913246*^9, 
   3.727178966567266*^9}, {3.727601687423465*^9, 3.727601704808043*^9}, {
   3.727601744534422*^9, 3.727601771061698*^9}, {3.727602475651042*^9, 
   3.727602607286476*^9}, {3.7276026482929697`*^9, 3.727602649418606*^9}, {
   3.727602816432906*^9, 3.727602879307555*^9}, {3.7276029234914637`*^9, 
   3.727602926124346*^9}, {3.727603730383863*^9, 3.72760373066368*^9}, {
   3.727603973849247*^9, 3.7276039750255003`*^9}, {3.738049785054161*^9, 
   3.7380497898471613`*^9}, 3.762793093715082*^9, {3.786955599831296*^9, 
   3.78695560341047*^9}, {3.7869620256301737`*^9, 3.786962027653013*^9}, {
   3.7869680814899187`*^9, 3.786968082808133*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[767]:=",
 CellID->774256687,ExpressionUUID->"f0c05d03-3df7-4851-955a-9302fdb797e3"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<GetCrystalSpaceGroup\>\"", ",", "input_String"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "sg", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Check", " ", "if", " ", "crystal", " ", "entry", " ", "exists"}], " ", 
     "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"InputCheck", "[", 
      RowBox[{"\"\<CrystalQ\>\"", ",", "input"}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Check", " ", "if", " ", "space", " ", "group", " ", "of", " ", 
       "crystal", " ", "is", " ", "valid"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"sg", "=", 
      RowBox[{"$CrystalData", "[", 
       RowBox[{"input", ",", "\"\<SpaceGroup\>\""}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"KeyExistsQ", "[", 
         RowBox[{"$GroupSymbolRedirect", ",", "sg"}], "]"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"InputCheck", "::", "InvalidSpaceGroupInCrystal"}], ",", 
          "input", ",", "sg"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"Return", "@", "sg"}]}], "]"}]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609766629499*^9}, {3.713609865523466*^9, 
   3.713609889562788*^9}, {3.7144567047959967`*^9, 3.714456760475725*^9}, {
   3.714456865530085*^9, 3.714456883711838*^9}, {3.7144569578701982`*^9, 
   3.714456970919194*^9}, {3.7147103047089357`*^9, 3.7147103160470448`*^9}, {
   3.714710780931141*^9, 3.714710786371043*^9}, {3.714711349610618*^9, 
   3.714711369582601*^9}, {3.717740904523778*^9, 3.717740920672461*^9}, {
   3.725958236767309*^9, 3.725958238463688*^9}, {3.727505577163589*^9, 
   3.7275055992983847`*^9}, {3.727505895015423*^9, 3.7275058952018433`*^9}, {
   3.727506115867244*^9, 3.72750615284511*^9}, {3.727506566988821*^9, 
   3.7275065675308313`*^9}, {3.7276035560711937`*^9, 3.72760355630114*^9}, {
   3.7276036304674597`*^9, 3.727603631524433*^9}, 3.727676784104806*^9, {
   3.7340864321506767`*^9, 3.7340865206369267`*^9}, 3.743865456049979*^9, 
   3.762793093722595*^9, 3.786956274496245*^9, {3.786962061484593*^9, 
   3.786962063155972*^9}, {3.786968086928224*^9, 3.786968088255666*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[768]:=",
 CellID->1328721236,ExpressionUUID->"8a7813c1-bcb2-42ed-9d22-dccdd1260a19"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<GetCrystalWavelength\>\"", ",", "input_String", ",", 
    RowBox[{"abortQ_:", "True"}]}], "]"}], ":=", 
  RowBox[{"(", "\[IndentingNewLine]", 
   RowBox[{"(*", " ", 
    RowBox[{"Check", " ", "if", " ", "crystal", " ", "entry", " ", "exists"}],
     " ", "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"InputCheck", "[", 
     RowBox[{"\"\<CrystalQ\>\"", ",", "input"}], "]"}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Return", " ", "crystal", " ", "wavelength", " ", "if", " ", 
      "attached"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{"If", "[", 
     RowBox[{
      RowBox[{"KeyExistsQ", "[", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"$CrystalData", "[", "input", "]"}], ",", 
        "\"\<Wavelength\>\""}], "]"}], ",", "\[IndentingNewLine]", "\t", 
      RowBox[{"Return", "@", 
       RowBox[{"$CrystalData", "[", "\[IndentingNewLine]", "\t", 
        RowBox[{"input", ",", "\"\<Wavelength\>\""}], "]"}]}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", " ", 
       RowBox[{
        RowBox[{"If", " ", "not"}], ",", " ", 
        RowBox[{
         RowBox[{"abort", " ", "OR", " ", 
          RowBox[{"return", " ", "'"}]}], "-", 
         RowBox[{"1", "'"}]}]}], " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"If", "[", 
       RowBox[{"abortQ", ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"Message", "[", 
          RowBox[{
           RowBox[{"InputCheck", "::", "NoWavelengthIncluded"}], ",", 
           "input"}], "]"}], ";", 
         RowBox[{"Abort", "[", "]"}]}], ",", "\[IndentingNewLine]", 
        RowBox[{"Return", "[", 
         RowBox[{"-", "1"}], "]"}]}], "\[IndentingNewLine]", "]"}]}], "]"}]}],
    ")"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609766629499*^9}, {3.713609803694686*^9, 
   3.7136098460035143`*^9}, {3.713609896764085*^9, 3.7136098971713457`*^9}, 
   3.7143124623172703`*^9, {3.714711400201912*^9, 3.7147114013487253`*^9}, {
   3.7177409045433407`*^9, 3.7177409045530024`*^9}, {3.7265604536850843`*^9, 
   3.7265604571899033`*^9}, 3.726561476915771*^9, {3.727603738644006*^9, 
   3.727603738970872*^9}, {3.727603872991158*^9, 3.7276038737620068`*^9}, 
   3.727675395188451*^9, {3.739125707135515*^9, 3.7391257657796993`*^9}, 
   3.786955585359413*^9, {3.786962080980385*^9, 3.78696208273151*^9}, {
   3.786968091320426*^9, 3.786968092871867*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[769]:=",
 CellID->135368299,ExpressionUUID->"19f3b089-ef31-4e1f-862b-0cae6d268263"],

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", " ", 
   RowBox[{"Converts", " ", "to", " ", 
    RowBox[{"wavelength", " ", "[", "\[ARing]ngstr\[ODoubleDot]ms", "]"}]}], 
   " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"InputCheck", "[", 
    RowBox[{"\"\<GetEnergyWavelength\>\"", ",", "input_", ",", 
     RowBox[{"unitsQ_:", "True"}]}], "]"}], ":=", 
   RowBox[{"Block", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"hcKeV", "=", "12.398420"}], ",", "\[Lambda]"}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Only", " ", "exception"}], " ", "*)"}], "\[IndentingNewLine]", 
     
     RowBox[{
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"input", "===", 
         RowBox[{"-", "1"}]}], ",", 
        RowBox[{"Return", "[", 
         RowBox[{"-", "1"}], "]"}]}], "]"}], ";", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", " ", 
       RowBox[{"Check", " ", "if", " ", "positive"}], " ", "*)"}], 
      "\[IndentingNewLine]", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"!", 
         RowBox[{"Positive", "@", "input"}]}], ",", 
        RowBox[{
         RowBox[{"Message", "[", 
          RowBox[{"InputCheck", "::", "EnergyMustBePositive"}], "]"}], ";", 
         RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
      "\[IndentingNewLine]", 
      RowBox[{"Which", "[", "\[IndentingNewLine]", 
       RowBox[{"(*", " ", 
        RowBox[{
         RowBox[{"A", ".", " ", "Number"}], " ", "input"}], " ", "*)"}], 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"NumericQ", "@", "input"}], ",", "\[IndentingNewLine]", "\t", 
        
        RowBox[{"Which", "[", "\[IndentingNewLine]", "\t", 
         RowBox[{"(*", " ", 
          RowBox[{"1.", " ", "Assume", " ", "\[ARing]ngstr\[ODoubleDot]ms"}], 
          " ", "*)"}], "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{"input", " ", "\[LessEqual]", " ", "5.0"}], ",", 
          RowBox[{"\[Lambda]", "=", 
           RowBox[{"N", "@", "input"}]}], ",", "\[IndentingNewLine]", "\t", 
          RowBox[{"(*", " ", 
           RowBox[{"2.", " ", "Assume", " ", "kilo", " ", "electronvolt"}], 
           " ", "*)"}], "\[IndentingNewLine]", "\t", 
          RowBox[{"input", " ", "\[LessEqual]", " ", "250.0"}], ",", 
          RowBox[{"\[Lambda]", "=", 
           RowBox[{"hcKeV", "/", "input"}]}], ",", "\[IndentingNewLine]", 
          "\t", 
          RowBox[{"(*", " ", 
           RowBox[{"3.", " ", "Assume", " ", "electronvolts"}], " ", "*)"}], 
          "\[IndentingNewLine]", "\t", "True", ",", 
          RowBox[{"\[Lambda]", "=", 
           RowBox[{"1000", "*", 
            RowBox[{"hcKeV", "/", "input"}]}]}]}], "\[IndentingNewLine]", 
         "\t", "]"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
        RowBox[{"(*", " ", 
         RowBox[{
          RowBox[{"B", ".", " ", "Quantity"}], " ", "input"}], " ", "*)"}], 
        "\[IndentingNewLine]", 
        RowBox[{"QuantityQ", "[", "input", "]"}], " ", ",", 
        "\[IndentingNewLine]", "\t", 
        RowBox[{"(*", " ", 
         RowBox[{
         "Convert", " ", "wavelength", " ", "or", " ", "energy", " ", "to", 
          " ", "\[ARing]ngstr\[ODoubleDot]ms"}], " ", "*)"}], 
        "\[IndentingNewLine]", "\t", 
        RowBox[{"Which", "[", "\[IndentingNewLine]", "\t", 
         RowBox[{
          RowBox[{
           RowBox[{"UnitDimensions", "[", "input", "]"}], "===", 
           RowBox[{"{", 
            RowBox[{"{", 
             RowBox[{"\"\<LengthUnit\>\"", ",", "1"}], "}"}], "}"}]}], ",", 
          "\[IndentingNewLine]", "\t\t", 
          RowBox[{
           RowBox[{"\[Lambda]", "=", 
            RowBox[{"UnitConvert", "[", 
             RowBox[{"input", ",", "\"\<Angstroms\>\""}], "]"}]}], ";", 
           "\[IndentingNewLine]", "\t\t", 
           RowBox[{"If", "[", 
            RowBox[{"unitsQ", ",", 
             RowBox[{"Return", "@", "\[Lambda]"}], ",", 
             RowBox[{"Return", "@", 
              RowBox[{"QuantityMagnitude", "@", "\[Lambda]"}]}]}], "]"}]}], 
          ",", "\[IndentingNewLine]", "\[IndentingNewLine]", "\t", 
          RowBox[{"CompatibleUnitQ", "[", 
           RowBox[{"input", ",", "\"\<Joules\>\""}], "]"}], ",", "\t\t", 
          "\[IndentingNewLine]", "\t\t", 
          RowBox[{"\[Lambda]", "=", 
           RowBox[{"hcKeV", "/", 
            RowBox[{"QuantityMagnitude", "@", "\[IndentingNewLine]", "\t\t", 
             RowBox[{"UnitConvert", "[", 
              RowBox[{"input", ",", "\"\<Kiloelectronvols\>\""}], "]"}]}]}]}],
           ",", "\[IndentingNewLine]", "\[IndentingNewLine]", "\t", "True", 
          ",", "\[IndentingNewLine]", "\t\t", 
          RowBox[{
           RowBox[{"Message", "[", 
            RowBox[{"InputCheck", "::", "EnergyUnitExpected"}], "]"}], ";", 
           "\[IndentingNewLine]", "\t\t", 
           RowBox[{"Abort", "[", "]"}]}]}], "\[IndentingNewLine]", "\t", 
         "]"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
        RowBox[{"(*", " ", 
         RowBox[{
          RowBox[{"C", ".", " ", "None"}], " ", "of", " ", "the", " ", 
          "above"}], " ", "*)"}], "\[IndentingNewLine]", "True", ",", 
        "\[IndentingNewLine]", "\t", 
        RowBox[{
         RowBox[{"Message", "[", 
          RowBox[{"InputCheck", "::", "InvalidEnergyInput"}], "]"}], ";", 
         RowBox[{"Abort", "[", "]"}]}]}], "\[IndentingNewLine]", "]"}], ";", 
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
      RowBox[{"(*", " ", 
       RowBox[{"Set", " ", "in", " ", "Quantity", " ", "if", " ", "desired"}],
        " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"If", "[", 
       RowBox[{"unitsQ", ",", "\[IndentingNewLine]", 
        RowBox[{"Quantity", "[", 
         RowBox[{"\[Lambda]", ",", "\"\<Angstroms\>\""}], "]"}], ",", 
        "\[IndentingNewLine]", "\[Lambda]"}], "]"}]}]}], 
    "\[IndentingNewLine]", "]"}]}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609703542757*^9}, 3.713609761205812*^9, {
   3.714456648703538*^9, 3.7144566607405*^9}, {3.714462761679092*^9, 
   3.714462774005431*^9}, {3.7144628807577868`*^9, 3.714462892938987*^9}, {
   3.714711288174638*^9, 3.7147112901418753`*^9}, {3.717740904496645*^9, 
   3.71774090450635*^9}, 3.725958197232127*^9, {3.726560443424157*^9, 
   3.726560447064084*^9}, 3.72685205362494*^9, {3.7268524061436033`*^9, 
   3.7268525118996563`*^9}, {3.726853451219391*^9, 3.726853553519404*^9}, {
   3.72685364594137*^9, 3.726853659220982*^9}, {3.726853721494712*^9, 
   3.7268537360194597`*^9}, {3.726853814139167*^9, 3.726853866046702*^9}, {
   3.72685391283145*^9, 3.726854013342908*^9}, {3.72685443464507*^9, 
   3.726854444243165*^9}, {3.726854740941407*^9, 3.726854744623098*^9}, {
   3.726854833074029*^9, 3.726854873935768*^9}, {3.72685491084039*^9, 
   3.726854918136497*^9}, {3.72685498979923*^9, 3.726855068318531*^9}, {
   3.726855109331604*^9, 3.726855122067479*^9}, {3.7268555301237164`*^9, 
   3.726855539752921*^9}, {3.7268559339858027`*^9, 3.726855959866241*^9}, {
   3.7268559904322023`*^9, 3.72685603510135*^9}, {3.72685615357065*^9, 
   3.72685615402689*^9}, {3.726856216650893*^9, 3.726856369277254*^9}, {
   3.7268564800835943`*^9, 3.7268564992580137`*^9}, {3.726856620967496*^9, 
   3.726856621815027*^9}, {3.726856668775392*^9, 3.726856720204636*^9}, {
   3.7268568209881*^9, 3.72685684971353*^9}, {3.72685688102668*^9, 
   3.7268569498483753`*^9}, {3.7268570554316273`*^9, 3.726857141124441*^9}, {
   3.72685733536134*^9, 3.726857445821105*^9}, {3.7268574798936377`*^9, 
   3.726857484116231*^9}, {3.726857520876247*^9, 3.726857597705496*^9}, {
   3.7268576490821247`*^9, 3.726857665286269*^9}, {3.726896856919681*^9, 
   3.726896865360489*^9}, {3.726897043655274*^9, 3.72689706577814*^9}, {
   3.726899351343816*^9, 3.726899381328332*^9}, 3.7268997978240433`*^9, {
   3.7275466850188923`*^9, 3.727546685984756*^9}, {3.727596442016464*^9, 
   3.727596443184536*^9}, {3.7275965437672157`*^9, 3.727596576954631*^9}, 
   3.727596651111322*^9, {3.72760374260155*^9, 3.727603759529471*^9}, {
   3.728109774970121*^9, 3.728109880586781*^9}, 3.73441267980902*^9, {
   3.738049815649427*^9, 3.738049826421247*^9}, {3.7391251770910673`*^9, 
   3.739125211688257*^9}, {3.7391256829934187`*^9, 3.739125689976153*^9}, 
   3.762793093738366*^9, 3.786955436572969*^9, 3.786955487113967*^9, {
   3.786955519104815*^9, 3.786955525904479*^9}, {3.78696212378834*^9, 
   3.786962125563382*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[770]:=",
 CellID->949819120,ExpressionUUID->"22e5d93f-0878-4727-83c1-974ef0cb7024"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<GetPointSpaceGroupCrystal\>\"", ",", "input_"}], "]"}], ":=", 
  
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{"$CrystalDataCombined", ",", "sg"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{
     "Check", " ", "if", " ", "space", " ", "group", " ", "number", " ", "is",
       " ", "given"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "\[LessEqual]", "input", "\[LessEqual]", "230"}], ")"}],
         "&&", 
        RowBox[{"IntegerQ", "@", "input"}]}], ",", 
       RowBox[{"Return", "@", 
        RowBox[{"$SpaceGroups", "\[LeftDoubleBracket]", 
         RowBox[{"input", ",", "\"\<Name\>\"", ",", "\"\<Symbol\>\""}], 
         "\[RightDoubleBracket]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{
        RowBox[{
        "If", " ", "actual", " ", "input", " ", "is", " ", "a", " ", 
         "point"}], "-", " ", 
        RowBox[{"or", " ", "space", " ", "group"}]}], ",", " ", 
       RowBox[{"return", " ", "it"}]}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"KeyExistsQ", "[", 
        RowBox[{"$GroupSymbolRedirect", ",", "input"}], "]"}], ",", 
       RowBox[{"Return", "@", "input"}]}], "]"}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"(*", " ", 
      RowBox[{
      "Check", " ", "if", " ", "crystal", " ", "entry", " ", "exists"}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"AssociationQ", "@", "MaXrd`Private`$TempCrystalData"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"$CrystalDataCombined", "=", 
        RowBox[{"Join", "[", "\[IndentingNewLine]", 
         RowBox[{"$CrystalData", ",", "MaXrd`Private`$TempCrystalData"}], 
         "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"$CrystalDataCombined", "=", "$CrystalData"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MissingQ", "@", 
        RowBox[{"$CrystalDataCombined", "[", "input", "]"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"InputCheck", "::", "InvalidSymmetryObject"}], ",", 
          "input"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Check", " ", "if", " ", "space", " ", "group", " ", "of", " ", 
       "crystal", " ", "exists"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"sg", "=", 
      RowBox[{"$CrystalDataCombined", "[", 
       RowBox[{"input", ",", "\"\<SpaceGroup\>\""}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"KeyExistsQ", "[", 
         RowBox[{"$GroupSymbolRedirect", ",", "sg"}], "]"}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"InputCheck", "::", "InvalidSpaceGroupInCrystal"}], ",", 
          "input", ",", "sg"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"Return", "@", "sg"}]}], "]"}]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609766629499*^9}, {3.713609865523466*^9, 
   3.713609889562788*^9}, {3.7144567047959967`*^9, 3.714456760475725*^9}, {
   3.714456865530085*^9, 3.714456883711838*^9}, {3.7144569578701982`*^9, 
   3.714456970919194*^9}, {3.7147103047089357`*^9, 3.7147103160470448`*^9}, {
   3.714710780931141*^9, 3.714710786371043*^9}, {3.714711349610618*^9, 
   3.714711369582601*^9}, {3.717740904523778*^9, 3.717740920672461*^9}, {
   3.725958236767309*^9, 3.725958238463688*^9}, {3.727505577163589*^9, 
   3.7275055992983847`*^9}, {3.727505895015423*^9, 3.7275058952018433`*^9}, {
   3.727506115867244*^9, 3.72750615284511*^9}, {3.72750620550637*^9, 
   3.727506277082754*^9}, 3.7275065790218277`*^9, 3.72750668943563*^9, {
   3.7275138768842697`*^9, 3.727513877580575*^9}, {3.7276037003393583`*^9, 
   3.7276037005968237`*^9}, {3.727603930848737*^9, 3.727603935750414*^9}, {
   3.734086562493793*^9, 3.734086592174155*^9}, {3.734087081953874*^9, 
   3.734087111656989*^9}, {3.743865456115304*^9, 3.743865456153502*^9}, {
   3.758529973221416*^9, 3.7585299759035673`*^9}, {3.7614238939583063`*^9, 
   3.7614239274759207`*^9}, {3.76142400648403*^9, 3.7614240067298727`*^9}, {
   3.7614240390817547`*^9, 3.7614241404093447`*^9}, {3.7614242479891987`*^9, 
   3.7614242705338163`*^9}, {3.761424370948794*^9, 3.761424372186491*^9}, 
   3.762793093748088*^9, 3.786956278800035*^9, 3.786956318206355*^9, {
   3.786962166771103*^9, 3.7869621682259617`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[771]:=",
 CellID->1364001689,ExpressionUUID->"8d7a0ffb-c7e6-42a6-966b-9ee1ca05b563"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{
   "\"\<GetReciprocalImageOrientation\>\"", ",", "\[IndentingNewLine]", 
    "latticeInput_", ",", "hklPlane_", ",", "indexLimit_", ",", 
    "directSpaceQ_"}], "\[IndentingNewLine]", "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"hkl", "=", "hklPlane"}], ",", "\[IndentingNewLine]", 
      "abscissaIndex", ",", "ordinateIndex", ",", "planeConstant", ",", 
      "planeIndex", ",", "\[IndentingNewLine]", 
      RowBox[{"bottomLeft", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "1"}], ",", 
         RowBox[{"-", "1"}]}], "}"}]}], ",", 
      RowBox[{"bottomRight", "=", 
       RowBox[{"{", 
        RowBox[{"1", ",", 
         RowBox[{"-", "1"}]}], "}"}]}], ",", 
      RowBox[{"topRight", "=", 
       RowBox[{"{", 
        RowBox[{"1", ",", "1"}], "}"}]}], ",", 
      RowBox[{"topLeft", "=", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"-", "1"}], ",", "1"}], "}"}]}], ",", "\[IndentingNewLine]", 
      "M", ",", "\[Xi]", ",", "imageOrientation"}], "\[IndentingNewLine]", 
     "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"StringQ", "@", "hkl"}], ",", 
       RowBox[{"hkl", "=", 
        RowBox[{"MillerNotationToList", "@", "hkl"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"abscissaIndex", ",", "ordinateIndex", ",", "planeConstant"}], 
       "}"}], "=", 
      RowBox[{
       RowBox[{
        RowBox[{"{", 
         RowBox[{"#1", ",", "#2", ",", 
          RowBox[{
          "hkl", "\[LeftDoubleBracket]", "#3", "\[RightDoubleBracket]"}]}], 
         "}"}], "&"}], "@@", 
       RowBox[{"Flatten", "[", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{
          RowBox[{"Position", "[", 
           RowBox[{"hkl", ",", "#"}], "]"}], "&"}], "/@", 
         RowBox[{"{", 
          RowBox[{
          "\"\<h\>\"", ",", "\"\<k\>\"", ",", "\"\<l\>\"", ",", "_Integer"}], 
          "}"}]}], "]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"planeIndex", "=", 
      RowBox[{"First", "@", 
       RowBox[{"Complement", "[", 
        RowBox[{
         RowBox[{"Range", "@", "3"}], ",", 
         RowBox[{"{", 
          RowBox[{"abscissaIndex", ",", "ordinateIndex"}], "}"}]}], "]"}]}]}],
      ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"TrueQ", "@", "directSpaceQ"}], ",", "\[IndentingNewLine]", 
       RowBox[{"(*", " ", 
        RowBox[{
         RowBox[{"a", ".", " ", "Direct"}], " ", "space", " ", "vectors", " ", 
         RowBox[{"(", "uvw", ")"}]}], " ", "*)"}], "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"M", "=", 
         RowBox[{"GetCrystalMetric", "[", 
          RowBox[{"latticeInput", ",", 
           RowBox[{"\"\<ToCartesian\>\"", "\[Rule]", "True"}]}], "]"}]}], ";",
         "\[IndentingNewLine]", 
        RowBox[{"\[Xi]", "=", 
         RowBox[{"2", "*", 
          RowBox[{"indexLimit", "/", 
           RowBox[{"Max", "@", "M"}]}]}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"M", "=", 
         RowBox[{"M", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"abscissaIndex", ",", "ordinateIndex"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"abscissaIndex", ",", "ordinateIndex"}], "}"}]}], "]"}], 
          "]"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"imageOrientation", "=", 
         RowBox[{"\[Xi]", "*", 
          RowBox[{"{", 
           RowBox[{"bottomRight", ",", "topLeft", ",", "topRight"}], 
           "}"}]}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"imageOrientation", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"#", ".", "M"}], "&"}], "/@", "imageOrientation"}]}], ";", 
        "\[IndentingNewLine]", 
        RowBox[{"imageOrientation", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"Insert", "[", 
            RowBox[{"#", ",", 
             RowBox[{"N", "@", "planeConstant"}], ",", "planeIndex"}], "]"}], 
           "&"}], "/@", "imageOrientation"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"imageOrientation", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"Append", "[", 
            RowBox[{"#1", ",", "#2"}], "]"}], "&"}], "@@@", 
          RowBox[{"Transpose", "[", "\[IndentingNewLine]", 
           RowBox[{"{", 
            RowBox[{"imageOrientation", ",", 
             RowBox[{"{", 
              RowBox[{"500", ",", "500", ",", "1"}], "}"}]}], "}"}], 
           "]"}]}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"PrependTo", "[", 
         RowBox[{"imageOrientation", ",", 
          RowBox[{"imageOrientation", "\[LeftDoubleBracket]", 
           RowBox[{"3", ",", 
            RowBox[{"{", 
             RowBox[{"1", ",", "2", ",", "3"}], "}"}]}], 
           "\[RightDoubleBracket]"}]}], "]"}]}], ",", "\[IndentingNewLine]", 
       "\[IndentingNewLine]", 
       RowBox[{"(*", " ", 
        RowBox[{
         RowBox[{"b", ".", " ", "Corners"}], " ", "in", " ", "reciprocal", 
         " ", "space"}], " ", "*)"}], "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"imageOrientation", "=", 
         RowBox[{"indexLimit", "*", 
          RowBox[{"{", 
           RowBox[{"bottomLeft", ",", "bottomRight", ",", "topLeft"}], 
           "}"}]}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"imageOrientation", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"N", "@", 
            RowBox[{"Insert", "[", 
             RowBox[{"#", ",", "planeConstant", ",", "planeIndex"}], "]"}]}], 
           "&"}], "/@", "imageOrientation"}]}]}]}], "\[IndentingNewLine]", 
      "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"imageOrientation", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"MapAt", "[", 
         RowBox[{"#", ",", "imageOrientation", ",", "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"All", ",", 
            RowBox[{"{", 
             RowBox[{"abscissaIndex", ",", "ordinateIndex"}], "}"}]}], 
           "}"}]}], "]"}], "&"}], "[", 
       RowBox[{
        RowBox[{"DecimalForm", "[", "\[IndentingNewLine]", 
         RowBox[{"#", ",", 
          RowBox[{"{", 
           RowBox[{"7", ",", "4"}], "}"}], ",", 
          RowBox[{"NumberPadding", "\[Rule]", 
           RowBox[{"{", 
            RowBox[{"\"\< \>\"", ",", "\"\<0\>\""}], "}"}]}]}], "]"}], "&"}], 
       "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"imageOrientation", "=", 
      RowBox[{"Map", "[", 
       RowBox[{"ToString", ",", "imageOrientation", ",", 
        RowBox[{"{", "2", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"imageOrientation", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"StringRiffle", "[", 
         RowBox[{"#", ",", "\"\<,  \>\""}], "]"}], "&"}], "/@", 
       "imageOrientation"}]}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.760948481143589*^9, 3.760948499262701*^9}, {
   3.7609488207683067`*^9, 3.760948841778069*^9}, {3.760948882588552*^9, 
   3.760948883842764*^9}, {3.760948940717063*^9, 3.760948975282666*^9}, {
   3.760949011970159*^9, 3.760949012184416*^9}, 3.760949083736237*^9, {
   3.760949130238394*^9, 3.76094916161519*^9}, 3.760985557982565*^9, {
   3.7611975087352133`*^9, 3.76119751660457*^9}, {3.761474171084214*^9, 
   3.761474174768375*^9}, {3.761474414190099*^9, 3.761474436739811*^9}, {
   3.761474489155945*^9, 3.761474515473364*^9}, {3.761474549322021*^9, 
   3.761474603151936*^9}, {3.761474729429777*^9, 3.761474784036825*^9}, {
   3.761474849276947*^9, 3.7614748512846203`*^9}, 3.7614749412429934`*^9, {
   3.761475075055262*^9, 3.761475111589944*^9}, {3.761475177678194*^9, 
   3.761475208235873*^9}, {3.7614754099022007`*^9, 3.761475460275897*^9}, {
   3.7614755580354347`*^9, 3.7614755584485207`*^9}, {3.761475602255143*^9, 
   3.761475618458747*^9}, {3.761475728303033*^9, 3.7614757291959743`*^9}, {
   3.761475895540306*^9, 3.761475953150948*^9}, {3.7614759877525053`*^9, 
   3.7614760216772137`*^9}, {3.761476346852703*^9, 3.761476436475614*^9}, {
   3.761476501004677*^9, 3.7614765014024887`*^9}, {3.76147653684481*^9, 
   3.7614765625145817`*^9}, {3.7614766027780857`*^9, 3.761476696389943*^9}, {
   3.761476781958541*^9, 3.761476847138636*^9}, {3.761476879235957*^9, 
   3.761476898257463*^9}, {3.7614769388987217`*^9, 3.761476939672125*^9}, {
   3.7617280288811703`*^9, 3.7617280290289*^9}, {3.762062000358593*^9, 
   3.762062002890757*^9}, 3.7622515661086082`*^9, {3.762251817102137*^9, 
   3.762251929165433*^9}, {3.762252005452671*^9, 3.762252005611527*^9}, {
   3.762252046930657*^9, 3.7622520653518887`*^9}, {3.7622521337322073`*^9, 
   3.762252160781577*^9}, {3.762252243669989*^9, 3.762252252382333*^9}, {
   3.7622522870584927`*^9, 3.7622523110998173`*^9}, {3.7622525892905617`*^9, 
   3.762252653190784*^9}, {3.762252687617072*^9, 3.76225268868604*^9}, 
   3.762252720098925*^9, {3.7622602134972677`*^9, 3.762260245781844*^9}, {
   3.7622603606728363`*^9, 3.7622603955795927`*^9}, 3.762260809124468*^9, {
   3.762260920835347*^9, 3.7622609336590014`*^9}, {3.7622611020859957`*^9, 
   3.7622611022128*^9}, {3.762265433988163*^9, 3.762265647951427*^9}, {
   3.762265682974736*^9, 3.762265714676045*^9}, {3.7622657998190107`*^9, 
   3.762265823490719*^9}, {3.762266150777772*^9, 3.762266183714326*^9}, {
   3.762266297442079*^9, 3.762266404084507*^9}, {3.762266503346043*^9, 
   3.7622665058192873`*^9}, {3.762266581522806*^9, 3.762266603588318*^9}, {
   3.762266694495263*^9, 3.762266728238165*^9}, {3.762266789430751*^9, 
   3.76226681293922*^9}, {3.7622668497813883`*^9, 3.762266850066354*^9}, {
   3.762267098742383*^9, 3.762267102028309*^9}, {3.762267643315309*^9, 
   3.7622677082670116`*^9}, {3.762267743017583*^9, 3.762267788543005*^9}, {
   3.7622678343978357`*^9, 3.762267872315877*^9}, {3.762267908117887*^9, 
   3.762267928051405*^9}, 3.762267973773315*^9, {3.762268017780451*^9, 
   3.7622680575155687`*^9}, 3.762793093215591*^9, {3.763796995475988*^9, 
   3.7637970043599586`*^9}, {3.7643154838421183`*^9, 3.764315495506998*^9}, {
   3.764945527167924*^9, 3.764945538174453*^9}, {3.767432814398486*^9, 
   3.767432819483389*^9}, {3.7674328754926987`*^9, 3.767432894311245*^9}, {
   3.7674334785881023`*^9, 3.76743347876075*^9}, {3.783069231678774*^9, 
   3.783069266967184*^9}, 3.7830693020753717`*^9, {3.783087670253394*^9, 
   3.783087692517221*^9}, {3.783087735097041*^9, 3.7830880407310047`*^9}, {
   3.7830896557036057`*^9, 3.783089655981719*^9}, {3.7830960653733*^9, 
   3.783096097330763*^9}, {3.783096177529833*^9, 3.783096217488394*^9}, 
   3.783096403572884*^9, {3.783096499380589*^9, 3.783096678487729*^9}, {
   3.7830967101189957`*^9, 3.7830967683185453`*^9}, {3.783096810245809*^9, 
   3.7830969314424973`*^9}, {3.783157041710597*^9, 3.783157071451893*^9}, 
   3.783158293531158*^9, {3.783158345329475*^9, 3.7831584119283037`*^9}, {
   3.783162888798779*^9, 3.7831629160834846`*^9}, {3.783173913377779*^9, 
   3.783173927301927*^9}, {3.78317468233254*^9, 3.783174731586187*^9}, {
   3.783181333932486*^9, 3.783181355705113*^9}, 3.783182265822321*^9, {
   3.783182316941475*^9, 3.783182383458167*^9}, {3.783182554647244*^9, 
   3.7831825600059423`*^9}, {3.783182822376739*^9, 3.783182853542233*^9}, {
   3.783182889878277*^9, 3.783182934134598*^9}, {3.783182995421097*^9, 
   3.783183036649972*^9}, {3.783183069050721*^9, 3.783183191030245*^9}, {
   3.783183232775155*^9, 3.783183237420909*^9}, {3.78318339958671*^9, 
   3.7831834296081047`*^9}, {3.783183827440568*^9, 3.783183870661778*^9}, {
   3.7831858146833487`*^9, 3.783185820360832*^9}, {3.78318620357759*^9, 
   3.7831863955464983`*^9}, {3.7831864488989487`*^9, 3.783186585983418*^9}, {
   3.783186670150992*^9, 3.783186732816155*^9}, {3.783186772100696*^9, 
   3.7831867922121983`*^9}, {3.783186878850333*^9, 3.783186879920302*^9}, {
   3.7831870216135387`*^9, 3.783187032301166*^9}, {3.783187090181974*^9, 
   3.783187119805009*^9}, {3.783187195209736*^9, 3.783187211600642*^9}, {
   3.783187389227145*^9, 3.7831873956208487`*^9}, {3.7831874423488693`*^9, 
   3.7831874482836246`*^9}, {3.783187498147171*^9, 3.783187519594695*^9}, 
   3.783187549691279*^9, {3.7831875806594877`*^9, 3.7831875942107162`*^9}, 
   3.783187641746428*^9, {3.783187675529022*^9, 3.783187719981183*^9}, {
   3.78318775777507*^9, 3.783187777507882*^9}, {3.783195034318838*^9, 
   3.783195082369486*^9}, {3.783195129176243*^9, 3.783195130654354*^9}, 
   3.783195600430035*^9, {3.783195875568955*^9, 3.783195923116975*^9}, 
   3.7832404866326427`*^9, 3.783240537982945*^9, {3.783241766563958*^9, 
   3.783241770169858*^9}, {3.783242019589055*^9, 3.783242038913435*^9}, {
   3.783242224440885*^9, 3.783242232079968*^9}, {3.783242363414337*^9, 
   3.7832424064301023`*^9}, {3.783242440565166*^9, 3.7832424648026743`*^9}, {
   3.7832425068205843`*^9, 3.7832425069775333`*^9}, {3.7832428495568666`*^9, 
   3.7832428525702267`*^9}, {3.7833542866937017`*^9, 3.783354309444758*^9}, {
   3.783355614593163*^9, 3.783355640838348*^9}, {3.78335833421679*^9, 
   3.783358334758829*^9}, {3.783359693620332*^9, 3.783359721627674*^9}, {
   3.783361653056139*^9, 3.7833616572554417`*^9}, 3.783362194124464*^9, 
   3.78336223465842*^9, {3.783362393368207*^9, 3.78336245282276*^9}, {
   3.7833631602478237`*^9, 3.78336317317529*^9}, {3.783363636844595*^9, 
   3.783363674874811*^9}, {3.7834053675756693`*^9, 3.7834053792610207`*^9}, {
   3.78340583132686*^9, 3.783405831388301*^9}, {3.7834059187574177`*^9, 
   3.783405920434761*^9}, {3.783406753268241*^9, 3.783406758700287*^9}, {
   3.783408564127472*^9, 3.783408564196937*^9}, {3.783409214047086*^9, 
   3.783409220333387*^9}, {3.7834092529907017`*^9, 3.783409266756735*^9}, {
   3.783409308918028*^9, 3.783409328267762*^9}, {3.7834093770844517`*^9, 
   3.783409380945528*^9}, {3.783409474178068*^9, 3.783409480351221*^9}, {
   3.783409516417066*^9, 3.783409528518855*^9}, {3.7834095696870127`*^9, 
   3.783409575533265*^9}, {3.78341403995479*^9, 3.783414061688508*^9}, {
   3.783414179951048*^9, 3.783414199261772*^9}, {3.783415241625046*^9, 
   3.783415258198558*^9}, {3.783415294945393*^9, 3.783415333013176*^9}, {
   3.7834154590669413`*^9, 3.783415468578064*^9}, {3.7834155039130774`*^9, 
   3.783415527368451*^9}, {3.783418581398685*^9, 3.783418664800386*^9}, {
   3.783418723713091*^9, 3.7834187328069143`*^9}, {3.783419129079568*^9, 
   3.783419161050747*^9}, {3.783419483639987*^9, 3.783419490022593*^9}, 
   3.783419546414909*^9, {3.783419624037633*^9, 3.783419629859383*^9}, {
   3.783419691492093*^9, 3.78341970060884*^9}, {3.7834197798175917`*^9, 
   3.783419786526613*^9}, {3.7834198795754337`*^9, 3.783419888324492*^9}, {
   3.783419978237026*^9, 3.783419988274308*^9}, {3.783420066460009*^9, 
   3.783420075168106*^9}, {3.783420141537942*^9, 3.783420151366643*^9}, {
   3.783420438571474*^9, 3.783420446959621*^9}, {3.7834206705259237`*^9, 
   3.7834206829308367`*^9}, {3.7834207424382133`*^9, 3.783420750859206*^9}, {
   3.783421365767969*^9, 3.783421373597426*^9}, {3.783421965333004*^9, 
   3.783422006585594*^9}, {3.783422059923292*^9, 3.783422066422491*^9}, {
   3.783422880213716*^9, 3.783422887304878*^9}, {3.783423017795732*^9, 
   3.783423131788115*^9}, {3.783423170557499*^9, 3.7834231864683104`*^9}, {
   3.783423235235924*^9, 3.783423243065174*^9}, {3.7834232813629103`*^9, 
   3.78342328419268*^9}, {3.783423332465522*^9, 3.783423360958775*^9}, {
   3.7834235748693542`*^9, 3.783423585625668*^9}, {3.783423829774604*^9, 
   3.783423906795795*^9}, {3.7835949976169567`*^9, 3.783595000387117*^9}, {
   3.7835964592279263`*^9, 3.783596465811654*^9}, 3.7835983479689827`*^9, {
   3.783598416461194*^9, 3.78359844209156*^9}, {3.783598587874024*^9, 
   3.783598602712634*^9}, {3.783598980855957*^9, 3.783599040501889*^9}, {
   3.783599096541379*^9, 3.7835991615239563`*^9}, {3.783599196547413*^9, 
   3.7835992406904707`*^9}, {3.783599718079628*^9, 3.783599734270441*^9}, {
   3.783599800285762*^9, 3.783599888379499*^9}, {3.783599919258868*^9, 
   3.783599994201694*^9}, {3.7836001062555923`*^9, 3.783600110126745*^9}, {
   3.783600187447453*^9, 3.78360019428551*^9}, {3.783600246509571*^9, 
   3.783600315930904*^9}, {3.783600361020162*^9, 3.7836003877214746`*^9}, {
   3.783600860773121*^9, 3.7836008702921343`*^9}, {3.783601307850275*^9, 
   3.783601315817883*^9}, {3.783603710860333*^9, 3.7836037455479393`*^9}, 
   3.783603805400714*^9, {3.783611681345581*^9, 3.783611702481873*^9}, {
   3.7836263908296432`*^9, 3.7836264730652323`*^9}, {3.783626658029374*^9, 
   3.783626743539419*^9}, {3.783626786133835*^9, 3.783626855636197*^9}, {
   3.783626905628832*^9, 3.783626908979969*^9}, 3.783628008592647*^9, {
   3.78362806911053*^9, 3.78362808521664*^9}, {3.783628168549728*^9, 
   3.7836281958516827`*^9}, 3.783628228412869*^9, {3.783628262228024*^9, 
   3.783628285290011*^9}, {3.7836283228437138`*^9, 3.783628334856893*^9}, {
   3.783628375585116*^9, 3.783628396601012*^9}, {3.783628437320335*^9, 
   3.783628469613873*^9}, {3.7836285874692783`*^9, 3.78362867828119*^9}, {
   3.7836288838147583`*^9, 3.7836289593630753`*^9}, {3.7836289923480577`*^9, 
   3.7836290057698793`*^9}, 3.783630050494913*^9, {3.7836317844919157`*^9, 
   3.783631784554021*^9}, {3.7836321129729967`*^9, 3.7836321426425447`*^9}, 
   3.783672659872274*^9, {3.7836785454267273`*^9, 3.7836785468074217`*^9}, {
   3.783678581137383*^9, 3.783678581443434*^9}, 3.786967768778201*^9},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[772]:=",
 CellID->388455298,ExpressionUUID->"f1faa499-df0a-490c-90f2-cc4696471366"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<InterpretElement\>\"", ",", "input_"}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"elementsIn", "=", "input"}], ",", "pertiodicTable", ",", 
      "elementsRead", ",", "elementsReadNeutral", ",", "temp"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", 
     RowBox[{
      RowBox[{"--", "-"}], "*", " ", 
      RowBox[{"A", ".", " ", "Input"}], " ", "number", " ", "*", 
      RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"A", 
      RowBox[{".1", ".", " ", "Check"}], " ", "whether", " ", "number", " ", 
      "is", " ", "a", " ", "string"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"StringQ", "@", "elementsIn"}], ",", "\[IndentingNewLine]", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"StringMatchQ", "[", 
          RowBox[{"elementsIn", ",", "NumberString"}], "]"}], ",", 
         "\[IndentingNewLine]", 
         RowBox[{"elementsIn", "=", 
          RowBox[{"ToExpression", "@", "elementsIn"}]}]}], "]"}]}], "]"}], 
     ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"A", 
       RowBox[{".2", ".", " ", "Check"}], " ", "if", " ", "valid", " ", 
       "integer", " ", 
       RowBox[{"(", 
        RowBox[{"in", " ", "the", " ", "periodic", " ", "table"}], ")"}]}], 
      " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"NumericQ", "@", "elementsIn"}], ",", "\[IndentingNewLine]", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "\[LessEqual]", "elementsIn", "\[LessEqual]", 
            RowBox[{"Length", "@", "$PeriodicTable"}]}], ")"}], "&&", 
          RowBox[{"IntegerQ", "@", "elementsIn"}]}], ",", 
         RowBox[{"Return", "[", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{"Keys", "@", "$PeriodicTable"}], ")"}], 
           "\[LeftDoubleBracket]", "elementsIn", "\[RightDoubleBracket]"}], 
          "]"}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{
            RowBox[{"InputCheck", "::", "ElementNumber"}], ",", 
            RowBox[{"ToString", "@", "elementsIn"}]}], "]"}], ";", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"--", "-"}], "*", " ", 
       RowBox[{"B", ".", " ", "Process"}], " ", "single", " ", "string", " ", 
       "*", 
       RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"B", 
       RowBox[{".1", ".", " ", "Wrap"}], " ", "string"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"StringQ", "@", "elementsIn"}], ",", 
       RowBox[{"elementsIn", "=", 
        RowBox[{"{", "elementsIn", "}"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"--", "-"}], "*", " ", 
       RowBox[{"C", ".", " ", "Process"}], " ", "list", " ", "of", " ", 
       "strings", " ", "*", 
       RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", 
       RowBox[{".1", ".", " ", "Check"}], " ", "if", " ", "input", " ", "is", 
       " ", "a", " ", "list", " ", "of", " ", "strings"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"ListQ", "@", "elementsIn"}]}], ",", 
       RowBox[{"Goto", "[", "\"\<Failed\>\"", "]"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"AllTrue", "[", 
         RowBox[{"elementsIn", ",", "StringQ"}], "]"}]}], ",", 
       RowBox[{"Goto", "[", "\"\<Failed\>\"", "]"}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", 
       RowBox[{".2", ".", " ", "Set"}], " ", "of", " ", "valid", " ", 
       "symbols", " ", "from", " ", "the", " ", "periodic", " ", "table"}], 
      " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"pertiodicTable", "=", 
      RowBox[{"Keys", "@", "$PeriodicTable"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"C", 
        RowBox[{".3", ".", " ", "Find"}], " ", 
        RowBox[{"(", "possible", ")"}], " ", "matches"}], ",", " ", 
       RowBox[{"and", " ", "establish", " ", "order"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"elementsRead", "=", 
      RowBox[{"StringCases", "[", 
       RowBox[{"elementsIn", ",", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"StartOfString", "~~", 
          RowBox[{"a", ":", "LetterCharacter"}], "~~", 
          RowBox[{"{", 
           RowBox[{"\"\<\>\"", ",", 
            RowBox[{"b", ":", "LetterCharacter"}]}], "}"}], "~~", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"\"\<\>\"", ",", 
            RowBox[{
             RowBox[{"n1", ":", 
              RowBox[{"DigitCharacter", "..."}]}], "~~", 
             RowBox[{"pm", ":", 
              RowBox[{"{", 
               RowBox[{"\"\<+\>\"", ",", "\"\<-\>\""}], "}"}]}], "~~", 
             RowBox[{"n2", ":", 
              RowBox[{"DigitCharacter", "..."}]}]}]}], "}"}]}], 
         "\[IndentingNewLine]", "\[RuleDelayed]", 
         RowBox[{
          RowBox[{"ToUpperCase", "[", "a", "]"}], "<>", 
          RowBox[{"ToLowerCase", "[", "b", "]"}], "<>", "\[IndentingNewLine]", 
          RowBox[{"If", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"(", 
              RowBox[{"n1", "===", "\"\<\>\""}], ")"}], "&&", 
             RowBox[{"(", 
              RowBox[{"n2", "===", "\"\<\>\""}], ")"}]}], ",", "\"\<1\>\"", 
            ",", "\"\<\>\""}], "]"}], "<>", "n1", "<>", "n2", "<>", 
          "pm"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"Check", " ", "for", " ", "non"}], "-", "elements"}], " ", 
      "*)"}], "\[IndentingNewLine]", "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"MemberQ", "[", 
        RowBox[{"elementsRead", ",", 
         RowBox[{"{", "}"}]}], "]"}], ",", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"InputCheck", "::", "ElementError"}], ",", 
          "\[IndentingNewLine]", "\t", 
          RowBox[{"Part", "[", 
           RowBox[{"elementsIn", ",", 
            RowBox[{
             RowBox[{"Position", "[", 
              RowBox[{"elementsRead", ",", 
               RowBox[{"{", "}"}]}], "]"}], "\[LeftDoubleBracket]", 
             RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}]}], "]"}]}], 
         "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Separate", " ", "element", " ", "symbol", " ", "and", " ", "charge", 
       " ", 
       RowBox[{"(", 
        RowBox[{"if", " ", "any"}], ")"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"elementsRead", "=", 
      RowBox[{"Flatten", "[", 
       RowBox[{
        RowBox[{"StringCases", "[", 
         RowBox[{
          RowBox[{"Flatten", "@", "elementsRead"}], ",", 
          "\[IndentingNewLine]", "\t", 
          RowBox[{
           RowBox[{"StartOfString", "~~", 
            RowBox[{"a", ":", 
             RowBox[{"LetterCharacter", ".."}]}], "~~", "b___"}], 
           "\[IndentingNewLine]", "\t", "\[RuleDelayed]", 
           RowBox[{"{", 
            RowBox[{"a", ",", 
             RowBox[{"If", "[", 
              RowBox[{
               RowBox[{"b", "===", "\"\<\>\""}], ",", "\"\<&\>\"", ",", "b"}],
               "]"}]}], "}"}]}]}], "]"}], ",", "1"}], "]"}]}], 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{
        RowBox[{"'", "&"}], "'"}], " ", "should", " ", "be", " ", "deleted", 
       " ", "later"}], " ", "*)"}], ";", "\[IndentingNewLine]", "\t", 
     RowBox[{"elementsReadNeutral", "=", 
      RowBox[{"elementsRead", "\[LeftDoubleBracket]", 
       RowBox[{"All", ",", "1"}], "\[RightDoubleBracket]"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", 
       RowBox[{".4", ".", " ", "Remove"}], " ", "second", " ", "character", 
       " ", "if", " ", "not", " ", "applicable"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"elementsReadNeutral", "=", 
      RowBox[{"elementsReadNeutral", "/.", 
       RowBox[{
        RowBox[{"s_String", "/;", "\[IndentingNewLine]", 
         RowBox[{"!", 
          RowBox[{"MemberQ", "[", 
           RowBox[{"pertiodicTable", ",", "s"}], "]"}]}]}], "\[RuleDelayed]", 
        
        RowBox[{"StringTake", "[", 
         RowBox[{"s", ",", "1"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"(*", " ", 
      RowBox[{"Special", " ", 
       RowBox[{"case", ":", " ", "deuterium"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", "\t", 
     RowBox[{"elementsReadNeutral", "=", 
      RowBox[{"elementsReadNeutral", "/.", 
       RowBox[{"\"\<D\>\"", "\[Rule]", "\"\<H\>\""}]}]}], ";", 
     "\[IndentingNewLine]", "\t", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", 
       RowBox[{".5", ".", " ", "Final"}], " ", "validity", " ", "check"}], 
      " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"temp", "=", 
      RowBox[{"Complement", "[", 
       RowBox[{"elementsReadNeutral", ",", "pertiodicTable"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"temp", "=!=", 
        RowBox[{"{", "}"}]}], ",", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"InputCheck", "::", "ElementError"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"Part", "[", 
           RowBox[{"elementsIn", ",", 
            RowBox[{
             RowBox[{"Position", "[", 
              RowBox[{"elementsReadNeutral", ",", "\[IndentingNewLine]", 
               RowBox[{"First", "@", "temp"}]}], "]"}], 
             "\[LeftDoubleBracket]", 
             RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}]}], "]"}]}], 
         "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", 
       RowBox[{".6", ".", " ", "Concatenate"}], " ", "elements", " ", "and", 
       " ", "charge"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"elementsRead", "\[LeftDoubleBracket]", 
       RowBox[{"All", ",", "1"}], "\[RightDoubleBracket]"}], "=", 
      "elementsReadNeutral"}], ";", "\[IndentingNewLine]", 
     RowBox[{"elementsRead", "=", 
      RowBox[{"elementsRead", "/.", 
       RowBox[{"\"\<1\>\"", "\[Rule]", "\"\<\>\""}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"elementsRead", "=", 
      RowBox[{"StringDelete", "[", 
       RowBox[{
        RowBox[{"StringJoin", "/@", "elementsRead"}], ",", "\"\<&\>\""}], 
       "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"Goto", "[", "\"\<Done\>\"", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"--", "-"}], "*", " ", 
       RowBox[{"D", ".", " ", "Post"}], " ", "process", " ", "*", 
       RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"a", ".", " ", "Unable"}], " ", "to", " ", "determine", " ", 
       "chemical", " ", "element"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"Label", "[", "\"\<Failed\>\"", "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Message", "[", 
      RowBox[{
       RowBox[{"InputCheck", "::", "\"\<ElementFailed\>\""}], ",", 
       RowBox[{"ToString", "@", "input"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Abort", "[", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"b", ".", " ", "Return"}], " ", "string", " ", 
       RowBox[{"(", 
        RowBox[{"or", " ", "list", " ", "of", " ", "strings"}], ")"}]}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"Label", "[", "\"\<Done\>\"", "]"}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"StringQ", "@", "input"}], ",", "\[IndentingNewLine]", 
       RowBox[{
       "elementsRead", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}],
        ",", "elementsRead"}], "]"}]}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.734341137328184*^9, 3.7343411759988194`*^9}, {
   3.734341475311934*^9, 3.734341576694551*^9}, {3.734341967735984*^9, 
   3.734342044717266*^9}, {3.7343421124130297`*^9, 3.7343421147220497`*^9}, {
   3.734342157264969*^9, 3.7343421593299932`*^9}, {3.734342221153916*^9, 
   3.734342268636704*^9}, {3.734342315367675*^9, 3.734342348352634*^9}, {
   3.734342660472481*^9, 3.734342708367038*^9}, {3.734343038667759*^9, 
   3.734343065102769*^9}, {3.734343158173188*^9, 3.7343432657514677`*^9}, {
   3.734343330059511*^9, 3.734343345374936*^9}, {3.734343379084358*^9, 
   3.734343384220396*^9}, {3.734343453912177*^9, 3.734343472607889*^9}, {
   3.73434351476071*^9, 3.7343435158786793`*^9}, {3.734343583617649*^9, 
   3.7343436514341507`*^9}, {3.734343683030909*^9, 3.734343832579129*^9}, {
   3.7343438677100477`*^9, 3.7343439724631023`*^9}, {3.7343440088952208`*^9, 
   3.734344052952825*^9}, {3.734344095501465*^9, 3.7343441133871517`*^9}, {
   3.734344504885613*^9, 3.7343445722004347`*^9}, {3.734344746741618*^9, 
   3.734344778504403*^9}, {3.734344844849532*^9, 3.7343448449792213`*^9}, {
   3.734344914208906*^9, 3.734344914690722*^9}, {3.734344971285687*^9, 
   3.7343449799500437`*^9}, {3.7344114140022373`*^9, 3.734411571230638*^9}, {
   3.73441172129373*^9, 3.73441173825721*^9}, {3.734412700777219*^9, 
   3.734412709319187*^9}, {3.734413527709764*^9, 3.734413550093383*^9}, {
   3.7344137797137613`*^9, 3.7344137798642187`*^9}, {3.734413835296232*^9, 
   3.734413924894289*^9}, 3.734413976109795*^9, {3.734414156561953*^9, 
   3.7344141612237043`*^9}, {3.734414195600566*^9, 3.7344143143411903`*^9}, {
   3.734414882922276*^9, 3.734414894936925*^9}, {3.734414964231298*^9, 
   3.734415005952628*^9}, {3.734415042935251*^9, 3.734415047670806*^9}, {
   3.734415088734322*^9, 3.734415120620316*^9}, {3.734415326821014*^9, 
   3.7344154384774523`*^9}, {3.734415668960808*^9, 3.73441572954326*^9}, {
   3.734415779510621*^9, 3.734415821813545*^9}, {3.734415860540681*^9, 
   3.7344160340489798`*^9}, {3.734416125489831*^9, 3.73441614447849*^9}, {
   3.734416338910688*^9, 3.734416340339375*^9}, {3.7346678900276537`*^9, 
   3.7346679831146584`*^9}, {3.734668017765711*^9, 3.734668073329541*^9}, {
   3.734668375315628*^9, 3.734668413450987*^9}, {3.734669281971924*^9, 
   3.734669395756266*^9}, {3.734669642615943*^9, 3.734669686326432*^9}, {
   3.734669816249323*^9, 3.734669816447013*^9}, {3.734670351320223*^9, 
   3.734670352736187*^9}, {3.73467038659089*^9, 3.734670398274848*^9}, {
   3.734670437246735*^9, 3.734670487004538*^9}, {3.734670555686846*^9, 
   3.734670556393078*^9}, {3.7346707849406157`*^9, 3.734670991275021*^9}, {
   3.7350327225480556`*^9, 3.7350327285692*^9}, {3.735032790587693*^9, 
   3.7350328693591547`*^9}, {3.7350331913467073`*^9, 3.735033209989203*^9}, {
   3.73503328679311*^9, 3.735033337778858*^9}, {3.737278567175089*^9, 
   3.737278609150566*^9}, {3.737278661861796*^9, 3.7372787061104527`*^9}, {
   3.737278786430764*^9, 3.737278815614232*^9}, {3.737278876614931*^9, 
   3.737278894575992*^9}, {3.737279063214642*^9, 3.737279117617867*^9}, {
   3.737279153995288*^9, 3.737279156957521*^9}, {3.737279209224059*^9, 
   3.7372792281945353`*^9}, {3.737279265333662*^9, 3.7372792662517557`*^9}, {
   3.737279499593874*^9, 3.7372795003597097`*^9}, {3.7372795311927958`*^9, 
   3.737279607430427*^9}, {3.737279901036427*^9, 3.737279905187501*^9}, {
   3.73728056780586*^9, 3.737280595834815*^9}, {3.737280731938634*^9, 
   3.7372807824368553`*^9}, {3.737280821275927*^9, 3.737280850048135*^9}, {
   3.7372808982833033`*^9, 3.7372809507817802`*^9}, {3.737281047830305*^9, 
   3.737281064716365*^9}, {3.7372811554403543`*^9, 3.73728118861235*^9}, {
   3.7372812569776163`*^9, 3.737281316071546*^9}, {3.737281653054924*^9, 
   3.737281698062044*^9}, {3.737284237057*^9, 3.737284327083954*^9}, {
   3.7372843590048733`*^9, 3.737284369739956*^9}, {3.7372844386235523`*^9, 
   3.737284484892178*^9}, {3.7372850819056*^9, 3.737285090806818*^9}, {
   3.73728520111075*^9, 3.737285222748335*^9}, {3.737285270111203*^9, 
   3.73728530587646*^9}, {3.737285533840251*^9, 3.737285559292869*^9}, {
   3.7372856101403227`*^9, 3.737285657390164*^9}, {3.737285700136235*^9, 
   3.737285798718968*^9}, {3.7372858357113028`*^9, 3.737285868194257*^9}, {
   3.737285908459991*^9, 3.737286014905347*^9}, 3.737286052837697*^9, {
   3.7372861540618677`*^9, 3.737286154519107*^9}, {3.737286254980082*^9, 
   3.7372863413456507`*^9}, {3.737286380256139*^9, 3.7372864143825283`*^9}, {
   3.737286458977261*^9, 3.737286576079788*^9}, {3.737286623935347*^9, 
   3.737286632869177*^9}, {3.7372866648183327`*^9, 3.737286723584116*^9}, {
   3.737374746359795*^9, 3.737374832079135*^9}, {3.73737499904206*^9, 
   3.737375023959383*^9}, {3.737378138033321*^9, 3.737378164259573*^9}, {
   3.737378225363977*^9, 3.73737825691322*^9}, 3.7373784605339413`*^9, {
   3.737378502252293*^9, 3.73737864023484*^9}, {3.737378704823086*^9, 
   3.737378712047621*^9}, {3.737378750431796*^9, 3.737378752703669*^9}, {
   3.737378898239748*^9, 3.737378990411519*^9}, {3.73737903566635*^9, 
   3.7373791239583397`*^9}, {3.737379162032648*^9, 3.737379164836317*^9}, {
   3.7373792649735928`*^9, 3.7373793244342623`*^9}, {3.737379375913303*^9, 
   3.73737941501803*^9}, {3.737379491076782*^9, 3.737379495461954*^9}, {
   3.737379605763606*^9, 3.7373796928169928`*^9}, {3.73737986755727*^9, 
   3.7373800849030933`*^9}, {3.7373801268150043`*^9, 
   3.7373801843010073`*^9}, {3.737380294292263*^9, 3.737380294698414*^9}, {
   3.737380414361321*^9, 3.737380698358766*^9}, {3.7373807418017273`*^9, 
   3.73738075376825*^9}, {3.7373807854482927`*^9, 3.737380862411724*^9}, {
   3.737381036834449*^9, 3.737381064693281*^9}, {3.737381100937663*^9, 
   3.7373811217752542`*^9}, 3.737381158470895*^9, 3.737381221032393*^9, {
   3.737381678459423*^9, 3.737381805116645*^9}, {3.737381836958056*^9, 
   3.737381881326532*^9}, {3.737381917168672*^9, 3.7373819592222023`*^9}, {
   3.737382007542437*^9, 3.737382116848222*^9}, {3.7373821591203203`*^9, 
   3.737382355002592*^9}, {3.7379744155182457`*^9, 3.737974415670136*^9}, {
   3.7379754153411427`*^9, 3.737975452667324*^9}, {3.73797549962778*^9, 
   3.7379755241789637`*^9}, 3.737975563770276*^9, {3.737975648095365*^9, 
   3.7379756613659477`*^9}, {3.73921005915567*^9, 3.739210067088846*^9}, {
   3.7392103437571*^9, 3.739210372090125*^9}, {3.7392104083569927`*^9, 
   3.739210408785853*^9}, {3.739210561112054*^9, 3.739210658951914*^9}, {
   3.742878249248098*^9, 3.7428782535467987`*^9}, {3.7428782893930473`*^9, 
   3.742878353943668*^9}, {3.742878774060712*^9, 3.7428787793596373`*^9}, {
   3.742878811736623*^9, 3.742878976915493*^9}, {3.7428790184091597`*^9, 
   3.7428790837272663`*^9}, {3.742879158784565*^9, 3.7428791803486032`*^9}, {
   3.742879211104168*^9, 3.742879211738106*^9}, {3.7585299775360603`*^9, 
   3.75853003338778*^9}, 3.7627930937690287`*^9, {3.786967780924135*^9, 
   3.786967783242278*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[773]:=",
 CellID->417906606,ExpressionUUID->"9ca230e4-669e-4c4b-b339-de248e88e66a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<InterpretSpaceGroup\>\"", ",", "input_", ",", 
    RowBox[{"abortQ_:", "True"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"sg", "=", "input"}], ",", "o", ",", "temp"}], "}"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"(*", 
     RowBox[{
      RowBox[{"--", "-"}], "*", " ", 
      RowBox[{"A", ".", " ", "Input"}], " ", "number", " ", "*", 
      RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"A", 
      RowBox[{".1", ".", " ", "Check"}], " ", "whether", " ", "number", " ", 
      "is", " ", "a", " ", "string"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"StringQ", "@", "sg"}], ",", "\[IndentingNewLine]", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"StringMatchQ", "[", 
          RowBox[{
           RowBox[{"StringTrim", "@", "sg"}], ",", "NumberString"}], "]"}], 
         ",", "\[IndentingNewLine]", 
         RowBox[{"sg", "=", 
          RowBox[{"ToExpression", "@", "sg"}]}]}], "]"}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"A", 
       RowBox[{".2", ".", " ", "Check"}], " ", "if", " ", "valid", " ", 
       "integer", " ", 
       RowBox[{"(", 
        RowBox[{
        "a", " ", "canonical", " ", "space", " ", "group", " ", "number"}], 
        ")"}]}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"NumericQ", "@", "sg"}], ",", "\[IndentingNewLine]", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{"1", "\[LessEqual]", "sg", "\[LessEqual]", "230"}], ")"}], 
          "&&", 
          RowBox[{"IntegerQ", "@", "sg"}]}], ",", 
         RowBox[{"Return", "@", 
          RowBox[{"$SpaceGroups", "\[LeftDoubleBracket]", 
           RowBox[{"sg", ",", "\"\<Name\>\"", ",", "\"\<Symbol\>\""}], 
           "\[RightDoubleBracket]"}]}], ",", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{"InputCheck", "::", "InvalidSpaceGroupNumber"}], "]"}], 
          ";", "\[IndentingNewLine]", 
          RowBox[{"If", "[", 
           RowBox[{"abortQ", ",", 
            RowBox[{"Abort", "[", "]"}], ",", 
            RowBox[{"Return", "@", "Null"}]}], "]"}]}]}], "]"}]}], 
      "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"--", "-"}], "*", " ", 
       RowBox[{"B", ".", " ", "Process"}], " ", "string", " ", "*", 
       RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"B", 
       RowBox[{".1", ".", " ", "Check"}], " ", "if", " ", "string"}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"StringQ", "@", "sg"}]}], ",", 
       RowBox[{"Goto", "[", "\"\<Failed\>\"", "]"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"sg", "=", 
      RowBox[{"StringTrim", "@", "sg"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"B", ".2", " ", "Process", " ", "any", " ", "annotations"}], 
      " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"StringContainsQ", "[", 
        RowBox[{"sg", ",", "\"\<origin\>\"", ",", 
         RowBox[{"IgnoreCase", "\[Rule]", "True"}]}], "]"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"o", "=", 
         RowBox[{"ChoiceDialog", "[", 
          RowBox[{
           RowBox[{
           "\"\<Information on cell origin detected.\>\"", "<>", 
            "\[IndentingNewLine]", "\"\<\\n\>\"", "<>", 
            "\"\<Please confirm the cell origin.\>\""}], ",", 
           RowBox[{"{", 
            RowBox[{"1", ",", "2"}], "}"}], ",", "\[IndentingNewLine]", 
           RowBox[{"WindowTitle", "\[Rule]", "\"\<Cell origin\>\""}]}], 
          "]"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"sg", "=", 
         RowBox[{"StringDelete", "[", 
          RowBox[{"sg", ",", 
           RowBox[{
           "Whitespace", "~~", "\"\<(\>\"", "~~", "__", "~~", "\"\<)\>\""}]}],
           "]"}]}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"B", ".3", " ", "Tidy", " ", "string"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"sg", "=", 
      RowBox[{"Fold", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"StringReplace", "[", 
          RowBox[{"#1", ",", "#2"}], "]"}], "&"}], ",", "sg", ",", 
        RowBox[{"{", "\[IndentingNewLine]", 
         RowBox[{"(*", " ", 
          RowBox[{"B", ".4", 
           RowBox[{".1", ".", " ", "Remove"}], " ", "any", " ", "_enclosing", 
           "_", " ", "quotation", " ", "marks"}], " ", "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{"(*", " ", 
          RowBox[{"Note", ":", " ", 
           RowBox[{
           "Some", " ", "Hall", " ", "symbols", " ", "contain", " ", "double",
             " ", "quotation", " ", "marks"}]}], " ", "*)"}], 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{
           RowBox[{"StartOfString", "~~", 
            RowBox[{"{", 
             RowBox[{"\"\<'\>\"", ",", "\"\<\\\"\>\""}], "}"}], "~~", 
            "main__", "~~", 
            RowBox[{"{", 
             RowBox[{"\"\<'\>\"", ",", "\"\<\\\"\>\""}], "}"}], "~~", 
            "EndOfString"}], "\[RuleDelayed]", "main"}], ",", 
          "\[IndentingNewLine]", "\[IndentingNewLine]", 
          RowBox[{"(*", " ", 
           RowBox[{
           "B", ".4", ".2", " ", "Uppercase", " ", "centring", " ", "1"}], 
           " ", "*)"}], "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"StartOfString", "~~", 
            RowBox[{"first", ":", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"\"\<-\>\"", "~~", "_"}], ",", "_"}], "}"}]}], "~~", 
            "rest__", "~~", "EndOfString"}], "\[RuleDelayed]", 
           "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"ToUpperCase", "@", "first"}], "~~", 
            RowBox[{"ToLowerCase", "@", "rest"}]}]}], ",", 
          "\[IndentingNewLine]", "\[IndentingNewLine]", 
          RowBox[{"(*", " ", 
           RowBox[{"B", ".4", 
            RowBox[{".3", ".", " ", "Fix"}], " ", "boxes"}], " ", "*)"}], 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{
            RowBox[{
            "\"\<overscriptbox\>\"", "\[Rule]", "\"\<OverscriptBox\>\""}], 
            ",", "\[IndentingNewLine]", 
            RowBox[{
            "\"\<subscriptbox\>\"", "\[Rule]", "\"\<SubscriptBox\>\""}]}], 
           "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
          RowBox[{"(*", " ", 
           RowBox[{
           "B", ".4", ".4", " ", "Uppercase", " ", "centring", " ", "2"}], 
           " ", "*)"}], "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"\"\<Box[\\(\>\"", "~~", "c_"}], "\[RuleDelayed]", 
           RowBox[{"\"\<Box[\\(\>\"", "<>", 
            RowBox[{"ToUpperCase", "[", "c", "]"}]}]}], ",", 
          "\[IndentingNewLine]", "\[IndentingNewLine]", 
          RowBox[{"(*", " ", 
           RowBox[{"B", ".4", ".5", " ", "Screw", " ", "axes"}], " ", "*)"}], 
          "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{
            RowBox[{"a", ":", "DigitCharacter"}], "~~", "\"\<(\>\"", "~~", 
            RowBox[{"b", ":", "DigitCharacter"}], "~~", "\"\<)\>\""}], 
           "\[RuleDelayed]", 
           RowBox[{"a", "<>", "b"}]}], ",", "\[IndentingNewLine]", 
          "\[IndentingNewLine]", 
          RowBox[{"(*", " ", 
           RowBox[{"B", ".4", 
            RowBox[{".6", ".", " ", "Miscellaneous"}], " ", "replacements"}], 
           " ", "*)"}], "\[IndentingNewLine]", 
          RowBox[{"\"\<;\>\"", "\[Rule]", "\"\< \>\""}]}], 
         "\[IndentingNewLine]", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"sg", "=", 
      RowBox[{"StringTrim", "@", "sg"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"--", "-"}], "*", " ", 
       RowBox[{"C", ".", " ", "Check"}], " ", "symbol", " ", "*", 
       RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", 
       RowBox[{".1", ".", " ", "Check"}], " ", "centring", " ", "symbol"}], 
      " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MemberQ", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
           "\"\<P\>\"", ",", "\"\<I\>\"", ",", "\"\<F\>\"", ",", "\"\<R\>\"", 
            ",", "\"\<A\>\"", ",", "\"\<B\>\"", ",", "\"\<C\>\"", ",", 
            "\"\<H\>\"", ",", "\"\<\\!\>\"", ",", "\"\<-\>\""}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"StringTake", "[", 
           RowBox[{"sg", ",", "1"}], "]"}]}], "]"}]}], ",", 
       RowBox[{"Goto", "[", "\"\<Failed\>\"", "]"}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"C", ".2", " ", "Check", " ", "if", " ", "found", " ", 
       RowBox[{"by", " ", "'"}], 
       RowBox[{"$GroupSymbolRedirect", "'"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"temp", "=", 
      RowBox[{"$GroupSymbolRedirect", "[", "sg", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MissingQ", "@", "temp"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{"KeyExistsQ", "[", 
           RowBox[{"temp", ",", "\"\<PointGroupNumber\>\""}], "]"}], ",", 
          RowBox[{"Goto", "[", "\"\<Failed\>\"", "]"}]}], "]"}], ";", 
        "\[IndentingNewLine]", 
        RowBox[{"sg", "=", 
         RowBox[{"temp", "\[LeftDoubleBracket]", 
          RowBox[{"\"\<Name\>\"", ",", "\"\<Symbol\>\""}], 
          "\[RightDoubleBracket]"}]}], ";", 
        RowBox[{"Goto", "[", "\"\<SpaceGroupFound\>\"", "]"}]}]}], "]"}], ";",
      "\[IndentingNewLine]", "\[IndentingNewLine]", "\t", 
     RowBox[{"(*", " ", 
      RowBox[{"Exception", ":", " ", 
       RowBox[{"Old", " ", "symbol"}]}], " ", "*)"}], "\[IndentingNewLine]", 
     "\t", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"sg", "===", "\"\<Fm3m\>\""}], ",", 
       RowBox[{
        RowBox[{"sg", "=", "\"\<Fm-3m\>\""}], ";", 
        RowBox[{"Goto", "[", "\"\<SpaceGroupFound\>\"", "]"}]}]}], "]"}], ";",
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "C", ".3", " ", "Delete", " ", "whitespace", " ", "and", " ", "check", 
       " ", "again"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"temp", "=", 
      RowBox[{"StringDelete", "[", 
       RowBox[{"sg", ",", "Whitespace"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"temp", "=", 
      RowBox[{"$GroupSymbolRedirect", "[", "temp", "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MissingQ", "@", "temp"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"sg", "=", 
         RowBox[{"temp", "\[LeftDoubleBracket]", 
          RowBox[{"\"\<Name\>\"", ",", "\"\<Symbol\>\""}], 
          "\[RightDoubleBracket]"}]}], ";", 
        RowBox[{"Goto", "[", "\"\<SpaceGroupFound\>\"", "]"}]}]}], "]"}], ";",
      "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", 
      RowBox[{
       RowBox[{"--", "-"}], "*", " ", 
       RowBox[{"D", ".", " ", "Post"}], " ", "process", " ", "*", 
       RowBox[{"--", "-"}]}], "*)"}], "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{"A", ".", " ", "Unable"}], " ", "to", " ", "determine", " ", 
       "space", " ", "group"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"Label", "[", "\"\<Failed\>\"", "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Message", "[", 
      RowBox[{
       RowBox[{"InputCheck", "::", "InvalidSpaceGroup"}], ",", "input"}], 
      "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{"abortQ", ",", 
       RowBox[{"Abort", "[", "]"}], ",", 
       RowBox[{"Return", "@", "Null"}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
       RowBox[{
        RowBox[{"B", ".", " ", "Return"}], " ", "non"}], "-", 
       RowBox[{"ambiguous", " ", "output"}]}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"Label", "[", "\"\<SpaceGroupFound\>\"", "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"ValueQ", "[", "o", "]"}], ",", 
       RowBox[{"sg", "=", 
        RowBox[{"sg", "<>", "\"\<:\>\"", "<>", 
         RowBox[{"ToString", "[", "o", "]"}]}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"ToStandardSetting", "[", "sg", "]"}]}]}], "\[IndentingNewLine]",
    "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.734341137328184*^9, 3.7343411759988194`*^9}, {
   3.734341475311934*^9, 3.734341576694551*^9}, {3.734341967735984*^9, 
   3.734342044717266*^9}, {3.7343421124130297`*^9, 3.7343421147220497`*^9}, {
   3.734342157264969*^9, 3.7343421593299932`*^9}, {3.734342221153916*^9, 
   3.734342268636704*^9}, {3.734342315367675*^9, 3.734342348352634*^9}, {
   3.734342660472481*^9, 3.734342708367038*^9}, {3.734343038667759*^9, 
   3.734343065102769*^9}, {3.734343158173188*^9, 3.7343432657514677`*^9}, {
   3.734343330059511*^9, 3.734343345374936*^9}, {3.734343379084358*^9, 
   3.734343384220396*^9}, {3.734343453912177*^9, 3.734343472607889*^9}, {
   3.73434351476071*^9, 3.7343435158786793`*^9}, {3.734343583617649*^9, 
   3.7343436514341507`*^9}, {3.734343683030909*^9, 3.734343832579129*^9}, {
   3.7343438677100477`*^9, 3.7343439724631023`*^9}, {3.7343440088952208`*^9, 
   3.734344052952825*^9}, {3.734344095501465*^9, 3.7343441133871517`*^9}, {
   3.734344504885613*^9, 3.7343445722004347`*^9}, {3.734344746741618*^9, 
   3.734344778504403*^9}, {3.734344844849532*^9, 3.7343448449792213`*^9}, {
   3.734344914208906*^9, 3.734344914690722*^9}, {3.734344971285687*^9, 
   3.7343449799500437`*^9}, {3.7344114140022373`*^9, 3.734411571230638*^9}, {
   3.73441172129373*^9, 3.73441173825721*^9}, {3.734412700777219*^9, 
   3.734412709319187*^9}, {3.734413527709764*^9, 3.734413550093383*^9}, {
   3.7344137797137613`*^9, 3.7344137798642187`*^9}, {3.734413835296232*^9, 
   3.734413924894289*^9}, 3.734413976109795*^9, {3.734414156561953*^9, 
   3.7344141612237043`*^9}, {3.734414195600566*^9, 3.7344143143411903`*^9}, {
   3.734414882922276*^9, 3.734414894936925*^9}, {3.734414964231298*^9, 
   3.734415005952628*^9}, {3.734415042935251*^9, 3.734415047670806*^9}, {
   3.734415088734322*^9, 3.734415120620316*^9}, {3.734415326821014*^9, 
   3.7344154384774523`*^9}, {3.734415668960808*^9, 3.73441572954326*^9}, {
   3.734415779510621*^9, 3.734415821813545*^9}, {3.734415860540681*^9, 
   3.7344160340489798`*^9}, {3.734416125489831*^9, 3.73441614447849*^9}, {
   3.734416338910688*^9, 3.734416340339375*^9}, {3.7346678900276537`*^9, 
   3.7346679831146584`*^9}, {3.734668017765711*^9, 3.734668073329541*^9}, {
   3.734668375315628*^9, 3.734668413450987*^9}, {3.734669281971924*^9, 
   3.734669395756266*^9}, {3.734669642615943*^9, 3.734669686326432*^9}, {
   3.734669816249323*^9, 3.734669816447013*^9}, {3.734670351320223*^9, 
   3.734670352736187*^9}, {3.73467038659089*^9, 3.734670398274848*^9}, {
   3.734670437246735*^9, 3.734670487004538*^9}, {3.734670555686846*^9, 
   3.734670556393078*^9}, {3.7346707849406157`*^9, 3.734670991275021*^9}, {
   3.7350327225480556`*^9, 3.7350327285692*^9}, {3.735032790587693*^9, 
   3.7350328693591547`*^9}, {3.7350331913467073`*^9, 3.735033209989203*^9}, {
   3.73503328679311*^9, 3.735033337778858*^9}, {3.737278689235427*^9, 
   3.737278724291026*^9}, {3.7373828319134293`*^9, 3.737382905583477*^9}, {
   3.7380503409830427`*^9, 3.7380503462202253`*^9}, {3.738050409199875*^9, 
   3.738050410020376*^9}, {3.738050587280776*^9, 3.738050594380994*^9}, {
   3.738050633314591*^9, 3.738050741885346*^9}, 3.738050787226899*^9, {
   3.738050820907621*^9, 3.738050913718038*^9}, {3.738050967336628*^9, 
   3.738051039601925*^9}, {3.738051123094633*^9, 3.7380511685169477`*^9}, {
   3.7380512915012083`*^9, 3.73805131582058*^9}, 3.73805147687253*^9, {
   3.738291406092393*^9, 3.738291463424559*^9}, {3.739251235484573*^9, 
   3.739251259594013*^9}, {3.7392664653604727`*^9, 3.739266516678097*^9}, 
   3.7392665477450542`*^9, {3.739267739894909*^9, 3.739267740037506*^9}, 
   3.73950412920148*^9, {3.742016464322269*^9, 3.742016465840391*^9}, {
   3.742022822926903*^9, 3.742022908512398*^9}, {3.742022978221959*^9, 
   3.74202298550244*^9}, {3.743865456276009*^9, 3.7438654563219023`*^9}, {
   3.7438669045354652`*^9, 3.7438669207895317`*^9}, {3.758530035604117*^9, 
   3.758530048874316*^9}, 3.762793093794232*^9, 3.786956173621265*^9, 
   3.786956233171356*^9, {3.786967829179142*^9, 3.7869678304655848`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[774]:=",
 CellID->1484801352,ExpressionUUID->"eb00d2e1-a7b9-4529-a9e2-ea3a353768d7"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<PointGroupQ\>\"", ",", "input_String"}], "]"}], ":=", 
  RowBox[{"(", "\[IndentingNewLine]", 
   RowBox[{"(*", " ", 
    RowBox[{
    "Check", " ", "if", " ", "valid", " ", "space", " ", "group", " ", 
     "string"}], " ", "*)"}], "\[IndentingNewLine]", 
   RowBox[{"If", "[", 
    RowBox[{
     RowBox[{"!", 
      RowBox[{"MemberQ", "[", 
       RowBox[{"$PointGroups", ",", "input", ",", "Infinity"}], "]"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"Message", "[", 
       RowBox[{
        RowBox[{"InputCheck", "::", "InvalidPointGroup"}], ",", "input"}], 
       "]"}], ";", 
      RowBox[{"Abort", "[", "]"}]}]}], "\[IndentingNewLine]", "]"}], 
   ")"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.7136042900817747`*^9}, {
   3.713604322627748*^9, 3.713604324160606*^9}, {3.7136043702641973`*^9, 
   3.713604371101212*^9}, {3.71471126435174*^9, 3.71471126555512*^9}, 
   3.717740897041522*^9, 3.72760353803649*^9, {3.7305444772094812`*^9, 
   3.730544481061934*^9}, {3.786955776603215*^9, 3.786955778865026*^9}, {
   3.7869678550624*^9, 3.7869678568855343`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[775]:=",
 CellID->1296344924,ExpressionUUID->"88c16eb4-e821-4949-94f4-4af75887aae7"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<PointSpaceGroupQ\>\"", ",", "input_String"}], "]"}], ":=", 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"Check", " ", "if", " ", "valid", " ", "point"}], "-", " ", 
    RowBox[{"or", " ", "space", " ", "group", " ", "string"}]}], " ", "*)"}], 
  "\[IndentingNewLine]", "\t", 
  RowBox[{"If", "[", 
   RowBox[{
    RowBox[{"!", 
     RowBox[{"KeyExistsQ", "[", 
      RowBox[{"$GroupSymbolRedirect", ",", "input"}], "]"}]}], ",", 
    "\[IndentingNewLine]", "\t", 
    RowBox[{
     RowBox[{"Message", "[", 
      RowBox[{
       RowBox[{"InputCheck", "::", "InvalidPointOrSpaceGroup"}], ",", 
       "input"}], "]"}], ";", 
     RowBox[{"Abort", "[", "]"}]}]}], "\[IndentingNewLine]", "\t", 
   "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, {
   3.713604296226803*^9, 3.713604299721271*^9}, {3.714710977590053*^9, 
   3.714710979768374*^9}, 3.717740920646922*^9, 3.7276035440759487`*^9, 
   3.743865456393198*^9, 3.786955741867633*^9, {3.786967867925956*^9, 
   3.786967869221291*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[776]:=",
 CellID->1447538853,ExpressionUUID->"8e56b7e1-e379-4e45-ab8b-50d1b34595dc"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<Polarisation\>\"", ",", "type_String", ",", 
    RowBox[{"scatteringAngle_:", "0"}]}], "]"}], ":=", "\[IndentingNewLine]", 
  
  RowBox[{"Which", "[", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"type", "===", "\"\<sigma\>\""}], "||", 
     RowBox[{"type", "===", "\"\<\[Sigma]\>\""}]}], ",", "1", ",", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"type", "===", "\"\<pi\>\""}], "||", 
     RowBox[{"type", "===", "\"\<\[Pi]\>\""}]}], ",", 
    RowBox[{"Abs", "@", 
     RowBox[{"Cos", "[", "scatteringAngle", "]"}]}], ",", 
    "\[IndentingNewLine]", "True", ",", 
    RowBox[{
     RowBox[{"Message", "[", 
      RowBox[{"InputCheck", "::", "InvalidPolarisationSetting"}], "]"}], ";", 
     
     RowBox[{"Abort", "[", "]"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",\

 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.713604260194231*^9}, {
   3.7136096220507708`*^9, 3.713609766629499*^9}, {3.713609803694686*^9, 
   3.7136098460035143`*^9}, {3.713609896764085*^9, 3.7136098971713457`*^9}, 
   3.7143124623172703`*^9, {3.714711400201912*^9, 3.7147114013487253`*^9}, {
   3.7177409045433407`*^9, 3.7177409045530024`*^9}, {3.7265604536850843`*^9, 
   3.7265604571899033`*^9}, 3.726561476915771*^9, {3.727603738644006*^9, 
   3.727603738970872*^9}, {3.727603872991158*^9, 3.7276038737620068`*^9}, 
   3.727675395188451*^9, {3.728765707484078*^9, 3.728765708834387*^9}, {
   3.728765780634018*^9, 3.728765813592382*^9}, {3.72876589943944*^9, 
   3.728765908688555*^9}, {3.730017879620852*^9, 3.730017885274577*^9}, {
   3.7869556349496*^9, 3.786955645732377*^9}, {3.7869678798936377`*^9, 
   3.786967882580845*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[777]:=",
 CellID->2090749155,ExpressionUUID->"80b7df9d-e33f-46d4-8b82-03afb2d25747"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{
   "\"\<ProcessWavelength\>\"", ",", "crystal_String", ",", "wavelength_", 
    ",", 
    RowBox[{"abortQ_:", "True"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[Lambda]", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"wavelength", "===", 
        RowBox[{"-", "1"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"\[Lambda]", "=", 
        RowBox[{"InputCheck", "[", 
         RowBox[{
         "\"\<GetCrystalWavelength\>\"", ",", "crystal", ",", "abortQ"}], 
         "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"\[Lambda]", "=", "wavelength"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"InputCheck", "[", 
      RowBox[{"\"\<GetEnergyWavelength\>\"", ",", "\[Lambda]", ",", "False"}],
       "]"}]}]}], "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.730395241910015*^9, 3.730395331782501*^9}, 
   3.73039551088382*^9, {3.7391249707350397`*^9, 3.739124986130555*^9}, {
   3.73912511330057*^9, 3.739125114641823*^9}, {3.739125407092436*^9, 
   3.7391254219192133`*^9}, {3.7391254965873337`*^9, 3.739125499857193*^9}, {
   3.739125656582911*^9, 3.739125666230063*^9}, 3.762793093803693*^9, {
   3.78696789325462*^9, 3.78696789750043*^9}, {3.7869685447895184`*^9, 
   3.7869685534921007`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[778]:=",
 CellID->2093615871,ExpressionUUID->"224cfbfe-443b-4170-b2d1-73bf36ac473b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"InputCheck", "[", 
   RowBox[{"\"\<RotationTransformation\>\"", ",", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"A_Integer", ",", "B_Integer", ",", "C_Integer"}], "}"}], ",", 
      "domains_List"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
     "AnchorShift_List", ",", "\[IndentingNewLine]", "anchorReference_String",
       ",", "\[IndentingNewLine]", "rotations_", ",", "\[IndentingNewLine]", 
      RowBox[{"rotationAxes_:", 
       RowBox[{"IdentityMatrix", "@", "3"}]}]}], "\[IndentingNewLine]", "}"}],
     ",", "\[IndentingNewLine]", 
    RowBox[{"force3Dinterpretation_:", "False"}]}], "\[IndentingNewLine]", 
   "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
     "twoDimensionalQ", ",", "coordinates", ",", "\[IndentingNewLine]", 
      "\[Zeta]", ",", "R", ",", "\[IndentingNewLine]", "uniqueDomains", ",", 
      RowBox[{"anchorShift", "=", "AnchorShift"}], ",", "anchors", ",", 
      "coordinatesGrouped", ",", "\[IndentingNewLine]", "domainAnchors", ",", 
      "zeroRotation", ",", "zeroAnchor"}], "\[IndentingNewLine]", "}"}], ",", 
    "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Preparations", " ", "and", " ", "checks"}], " ", "*)"}], 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Length", "@", "domains"}], "\[NotEqual]", 
        RowBox[{"A", "*", "B", "*", "C"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"InputCheck", "::", "DomainSizeError"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"uniqueDomains", "=", 
      RowBox[{"DeleteDuplicates", "@", "domains"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"twoDimensionalQ", "=", 
      RowBox[{"(", 
       RowBox[{"C", "===", "1"}], ")"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{"force3Dinterpretation", ",", 
       RowBox[{"twoDimensionalQ", "=", "False"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{"twoDimensionalQ", ",", 
       RowBox[{"anchorShift", "=", 
        RowBox[{"anchorShift", "\[LeftDoubleBracket]", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], "\[RightDoubleBracket]"}]}]}], 
      "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{"twoDimensionalQ", ",", "\[IndentingNewLine]", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"!", 
          RowBox[{"MatchQ", "[", 
           RowBox[{"anchorShift", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"_", "?", "NumericQ"}], ",", 
              RowBox[{"_", "?", "NumericQ"}]}], "}"}]}], "]"}]}], ",", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{"InputCheck", "::", "InvalidRotationPoint"}], "]"}], ";", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}], ",", "\[IndentingNewLine]", 
       
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{"!", 
          RowBox[{"MatchQ", "[", 
           RowBox[{"anchorShift", ",", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"_", "?", "NumericQ"}], ",", 
              RowBox[{"_", "?", "NumericQ"}], ",", 
              RowBox[{"_", "?", "NumericQ"}]}], "}"}]}], "]"}]}], ",", 
         "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"Message", "[", 
           RowBox[{"InputCheck", "::", "InvalidRotationPoint"}], "]"}], ";", 
          RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
      "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"AssociationQ", "@", "rotations"}], ",", "\[IndentingNewLine]", 
       RowBox[{"If", "[", 
        RowBox[{"twoDimensionalQ", ",", "\[IndentingNewLine]", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"AnyTrue", "[", 
            RowBox[{
             RowBox[{"Values", "@", "rotations"}], ",", "\[IndentingNewLine]", 
             RowBox[{
              RowBox[{"!", 
               RowBox[{"NumericQ", "[", "#", "]"}]}], "&"}]}], "]"}], ",", 
           "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"Message", "[", 
             RowBox[{
              RowBox[{"InputCheck", "::", "InvalidRotationMap"}], ",", 
              "\"\<2\>\"", ",", "\"\<scalars\>\""}], "]"}], ";", 
            "\[IndentingNewLine]", 
            RowBox[{"Abort", "[", "]"}]}]}], "]"}], ",", 
         "\[IndentingNewLine]", 
         RowBox[{"If", "[", 
          RowBox[{
           RowBox[{"AnyTrue", "[", 
            RowBox[{
             RowBox[{"Values", "@", "rotations"}], ",", "\[IndentingNewLine]", 
             RowBox[{
              RowBox[{"!", 
               RowBox[{"MatchQ", "[", 
                RowBox[{"#", ",", 
                 RowBox[{"ConstantArray", "[", 
                  RowBox[{
                   RowBox[{"_", "?", "NumericQ"}], ",", "3"}], "]"}]}], 
                "]"}]}], "&"}]}], "]"}], ",", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"Message", "[", 
             RowBox[{
              RowBox[{"InputCheck", "::", "InvalidRotationMap"}], ",", 
              "\"\<3\>\"", ",", "\"\<lists of three numbers\>\""}], "]"}], 
            ";", 
            RowBox[{"Abort", "[", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", 
        "]"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MemberQ", "[", "\[IndentingNewLine]", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
           "\"\<Host\>\"", ",", "\"\<Domain\>\"", ",", 
            "\"\<DomainCentroid\>\"", ",", "\"\<Unit\>\""}], "}"}], ",", 
          "anchorReference"}], "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"InputCheck", "::", "InvalidRotationReference"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Rotation", " ", "anchor", " ", "and", " ", "reference", " ", "for", 
       " ", "domains"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"anchorReference", "===", "\"\<Domain\>\""}], "||", 
        RowBox[{"anchorReference", "===", "\"\<DomainCentroid\>\""}]}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"coordinates", "=", 
         RowBox[{"Flatten", "[", 
          RowBox[{
           RowBox[{"Table", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{"i", ",", "j", ",", "k"}], "}"}], ",", 
             "\[IndentingNewLine]", 
             RowBox[{"{", 
              RowBox[{"i", ",", "0.", ",", 
               RowBox[{"A", "-", "1"}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"j", ",", "0.", ",", 
               RowBox[{"B", "-", "1"}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{"k", ",", "0.", ",", 
               RowBox[{"C", "-", "1"}]}], "}"}]}], "]"}], ",", "2"}], "]"}]}],
         ";", "\[IndentingNewLine]", 
        RowBox[{"If", "[", 
         RowBox[{"twoDimensionalQ", ",", 
          RowBox[{"coordinates", "=", 
           RowBox[{"coordinates", "\[LeftDoubleBracket]", 
            RowBox[{"All", ",", 
             RowBox[{"{", 
              RowBox[{"1", ",", "2"}], "}"}]}], "\[RightDoubleBracket]"}]}]}],
          "]"}], ";", "\[IndentingNewLine]", 
        RowBox[{"coordinatesGrouped", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"Pick", "[", 
            RowBox[{"coordinates", ",", "domains", ",", "#"}], "]"}], "&"}], "/@",
           "uniqueDomains"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"domainAnchors", "=", 
         RowBox[{
          RowBox[{"<|", "\[IndentingNewLine]", 
           RowBox[{
            RowBox[{"\"\<Domain\>\"", "\[Rule]", 
             RowBox[{"Flatten", "[", 
              RowBox[{
               RowBox[{
                RowBox[{
                 RowBox[{"TakeSmallestBy", "[", 
                  RowBox[{"#", ",", "Norm", ",", "1"}], "]"}], "&"}], "/@", 
                "coordinatesGrouped"}], ",", "1"}], "]"}]}], ",", 
            "\[IndentingNewLine]", 
            RowBox[{"\"\<DomainCentroid\>\"", "\[Rule]", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{
                RowBox[{"#", "+", 
                 RowBox[{"If", "[", 
                  RowBox[{"twoDimensionalQ", ",", 
                   RowBox[{"{", 
                    RowBox[{"0.5", ",", "0.5"}], "}"}], ",", 
                   RowBox[{"{", 
                    RowBox[{"0.5", ",", "0.5", ",", "0.5"}], "}"}]}], "]"}]}],
                 "\[IndentingNewLine]", "&"}], "/@", 
               RowBox[{"Map", "[", 
                RowBox[{"Mean", ",", 
                 RowBox[{"Transpose", "/@", "coordinatesGrouped"}], ",", 
                 RowBox[{"{", "2", "}"}]}], "]"}]}], ")"}]}]}], 
           "\[IndentingNewLine]", "|>"}], "@", "anchorReference"}]}], ";", 
        "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{
          RowBox[{"#", "+", "anchorShift"}], "&"}], "/@", "domainAnchors"}], 
        ";", "\[IndentingNewLine]", 
        RowBox[{"anchors", "=", 
         RowBox[{"N", "@", 
          RowBox[{"Association", "@", 
           RowBox[{"Thread", "[", 
            RowBox[{"uniqueDomains", "\[Rule]", "domainAnchors"}], 
            "]"}]}]}]}]}]}], "\[IndentingNewLine]", "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Rotation", " ", "transformation", " ", 
       RowBox[{"function", " ", "'"}], 
       RowBox[{"R", "'"}]}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"zeroRotation", ",", "zeroAnchor"}], "}"}], "=", 
      RowBox[{"If", "[", 
       RowBox[{"twoDimensionalQ", ",", "\[IndentingNewLine]", 
        RowBox[{"{", 
         RowBox[{"0.", ",", 
          RowBox[{"{", 
           RowBox[{"0.", ",", "0."}], "}"}]}], "}"}], ",", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"0.", ",", "0.", ",", "0."}], "}"}], ",", 
          RowBox[{"{", 
           RowBox[{"0.", ",", "0.", ",", "0."}], "}"}]}], "}"}]}], "]"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"\[Zeta]", "[", "d_", "]"}], ":=", 
      RowBox[{"N", "@", 
       RowBox[{"Lookup", "[", 
        RowBox[{"rotations", ",", "d", ",", "zeroRotation"}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Which", "[", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{
        RowBox[{"anchorReference", "===", "\"\<Host\>\""}], "&&", 
        "twoDimensionalQ"}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"R", "[", "d_", "]"}], ":=", 
        RowBox[{"Chop", "@", 
         RowBox[{"RotationTransform", "[", 
          RowBox[{
           RowBox[{"\[Zeta]", "@", "d"}], ",", "anchorShift"}], "]"}]}]}], 
       ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
       RowBox[{"anchorReference", "===", "\"\<Host\>\""}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{
         RowBox[{"R", "[", "d_", "]"}], ":=", 
         RowBox[{"Chop", "[", 
          RowBox[{"Composition", "@@", 
           RowBox[{"MapThread", "[", 
            RowBox[{
             RowBox[{
              RowBox[{"RotationTransform", "[", 
               RowBox[{"#1", ",", "#2", ",", "anchorShift"}], "]"}], "&"}], 
             ",", "\[IndentingNewLine]", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"\[Zeta]", "@", "d"}], ",", "rotationAxes"}], "}"}]}], 
            "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"R", "[", 
          RowBox[{"d_", ",", "p_"}], "]"}], ":=", 
         RowBox[{"Chop", "[", 
          RowBox[{"Composition", "@@", 
           RowBox[{"MapThread", "[", 
            RowBox[{
             RowBox[{
              RowBox[{"RotationTransform", "[", 
               RowBox[{"#1", ",", "#2", ",", "anchorShift"}], "]"}], "&"}], 
             ",", "\[IndentingNewLine]", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"If", "[", 
                RowBox[{
                 RowBox[{"!", 
                  RowBox[{"AssociationQ", "@", "rotations"}]}], ",", "d", ",", 
                 RowBox[{"\[Zeta]", "@", "d"}]}], "]"}], ",", 
               "rotationAxes"}], "}"}]}], "]"}]}], "]"}]}]}], ",", 
       "\[IndentingNewLine]", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"anchorReference", "===", "\"\<Unit\>\""}], "&&", 
        "twoDimensionalQ"}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"R", "[", 
         RowBox[{"d_", ",", "p_"}], "]"}], ":=", 
        RowBox[{"Chop", "@", 
         RowBox[{"RotationTransform", "[", 
          RowBox[{
           RowBox[{"\[Zeta]", "@", "d"}], ",", 
           RowBox[{"p", "+", "anchorShift"}]}], "]"}]}]}], ",", 
       "\[IndentingNewLine]", "\[IndentingNewLine]", 
       RowBox[{"anchorReference", "===", "\"\<Unit\>\""}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"R", "[", 
         RowBox[{"d_", ",", "p_"}], "]"}], ":=", 
        RowBox[{"Chop", "[", 
         RowBox[{"Composition", "@@", 
          RowBox[{"MapThread", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"RotationTransform", "[", 
              RowBox[{"#1", ",", "#2", ",", 
               RowBox[{"p", "+", "anchorShift"}]}], "]"}], "&"}], ",", 
            "\[IndentingNewLine]", 
            RowBox[{"{", 
             RowBox[{
              RowBox[{"If", "[", 
               RowBox[{
                RowBox[{"!", 
                 RowBox[{"AssociationQ", "@", "rotations"}]}], ",", "d", ",", 
                
                RowBox[{"\[Zeta]", "@", "d"}]}], "]"}], ",", "rotationAxes"}],
              "}"}]}], "]"}]}], "]"}]}], ",", "\[IndentingNewLine]", 
       "\[IndentingNewLine]", "twoDimensionalQ", ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"R", "[", "d_", "]"}], ":=", 
        RowBox[{"Chop", "@", 
         RowBox[{"RotationTransform", "[", 
          RowBox[{
           RowBox[{"\[Zeta]", "@", "d"}], ",", 
           RowBox[{
            RowBox[{"Lookup", "[", 
             RowBox[{"anchors", ",", "d", ",", "zeroAnchor"}], "]"}], "+", 
            "anchorShift"}]}], "]"}]}]}], ",", "\[IndentingNewLine]", 
       "\[IndentingNewLine]", "True", ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"R", "[", 
         RowBox[{"d_", ",", "p_"}], "]"}], ":=", 
        RowBox[{"Chop", "[", 
         RowBox[{"Composition", "@@", 
          RowBox[{"MapThread", "[", 
           RowBox[{
            RowBox[{
             RowBox[{"RotationTransform", "[", 
              RowBox[{"#1", ",", "#2", ",", "\[IndentingNewLine]", 
               RowBox[{
                RowBox[{"Lookup", "[", 
                 RowBox[{"anchors", ",", "d", ",", "zeroAnchor"}], "]"}], "+",
                 "anchorShift"}]}], "]"}], "&"}], ",", "\[IndentingNewLine]", 
            
            RowBox[{"{", 
             RowBox[{
              RowBox[{"\[Zeta]", "@", "d"}], ",", "rotationAxes"}], "}"}]}], 
           "]"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", "R"}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.713603211792478*^9, 3.713603330743202*^9}, 
   3.7136034818290167`*^9, {3.713603526324111*^9, 3.713603601082445*^9}, {
   3.7136036823367767`*^9, 3.713603756325656*^9}, {3.713603793229167*^9, 
   3.7136038014447613`*^9}, {3.71360423895645*^9, 3.7136042900817747`*^9}, {
   3.713604322627748*^9, 3.713604324160606*^9}, {3.7136043702641973`*^9, 
   3.713604371101212*^9}, {3.71471126435174*^9, 3.71471126555512*^9}, 
   3.717740897041522*^9, 3.72760353803649*^9, {3.7305444772094812`*^9, 
   3.730544481061934*^9}, 3.779134743520239*^9, 3.780063496561495*^9, {
   3.7800656334164047`*^9, 3.780065634143066*^9}, {3.781676971089305*^9, 
   3.781677003239027*^9}, {3.781677083550412*^9, 3.781677086541286*^9}, {
   3.781677135821582*^9, 3.781677144397409*^9}, 3.78167728536308*^9, {
   3.781677317834395*^9, 3.781677357288885*^9}, {3.781677912993319*^9, 
   3.781677913016111*^9}, {3.781677951924474*^9, 3.781677970755274*^9}, {
   3.7816781330093927`*^9, 3.78167813523242*^9}, {3.781678179945636*^9, 
   3.781678182943266*^9}, {3.781678272176132*^9, 3.781678319100099*^9}, {
   3.781678450962201*^9, 3.781678544345644*^9}, {3.781678605344584*^9, 
   3.781678606662899*^9}, {3.7816786767994003`*^9, 3.781678719116901*^9}, {
   3.781678758773364*^9, 3.78167878073839*^9}, {3.781685390107336*^9, 
   3.781685392186103*^9}, {3.7816860703813677`*^9, 3.781686073355639*^9}, {
   3.781686104268732*^9, 3.781686125722147*^9}, {3.781859766783502*^9, 
   3.781859790143857*^9}, 3.781859927210102*^9, {3.781860005751935*^9, 
   3.781860014926291*^9}, {3.7818600773703203`*^9, 3.781860205147441*^9}, {
   3.781860678688078*^9, 3.781860714993066*^9}, {3.7818608916803703`*^9, 
   3.781860961832633*^9}, {3.781861001983802*^9, 3.78186100746771*^9}, {
   3.781861062687028*^9, 3.781861068792898*^9}, {3.781861107409748*^9, 
   3.781861121342651*^9}, {3.7818611870840063`*^9, 3.78186125777414*^9}, 
   3.781861320496029*^9, {3.781861456082691*^9, 3.781861457347302*^9}, {
   3.7818620880497913`*^9, 3.781862089119491*^9}, {3.781862316614324*^9, 
   3.781862321067274*^9}, {3.7818623627629642`*^9, 3.781862477258976*^9}, {
   3.78186250728316*^9, 3.781862509610914*^9}, {3.781862557040826*^9, 
   3.781862597989863*^9}, {3.7818628952434883`*^9, 3.781862958581675*^9}, {
   3.781862991979748*^9, 3.781863035339814*^9}, {3.7818630671173*^9, 
   3.7818631148847933`*^9}, {3.781863168853231*^9, 3.781863194625503*^9}, {
   3.781863282165698*^9, 3.781863306630082*^9}, {3.781863786751247*^9, 
   3.781863835253973*^9}, 3.781864117837955*^9, {3.781864452399026*^9, 
   3.781864534765538*^9}, {3.7818645693580523`*^9, 3.7818646157650967`*^9}, {
   3.7818649204638*^9, 3.781864988659213*^9}, 3.781865226270296*^9, {
   3.7818653316106853`*^9, 3.781865334573888*^9}, {3.781865432728101*^9, 
   3.781865433330101*^9}, {3.781865582445928*^9, 3.7818656456516647`*^9}, {
   3.78186580312955*^9, 3.781865934637535*^9}, {3.78186597787962*^9, 
   3.781866010355785*^9}, {3.7818660671345243`*^9, 3.781866073844563*^9}, 
   3.781866144680382*^9, {3.781866206455649*^9, 3.781866246140813*^9}, {
   3.7818663425241127`*^9, 3.781866408362043*^9}, {3.781866538061561*^9, 
   3.781866602320487*^9}, {3.781866639333538*^9, 3.781866776972722*^9}, {
   3.781866810995131*^9, 3.781866889525423*^9}, {3.7818669716290293`*^9, 
   3.781866972156893*^9}, {3.781867150304977*^9, 3.781867221640732*^9}, {
   3.78186733287353*^9, 3.781867387849334*^9}, {3.781867460232662*^9, 
   3.781867520726623*^9}, {3.7818677067076483`*^9, 3.7818677262821007`*^9}, {
   3.781868214394621*^9, 3.7818682891615562`*^9}, {3.781868322616066*^9, 
   3.7818684031821527`*^9}, {3.781889694411968*^9, 3.78188969458493*^9}, {
   3.781889739240889*^9, 3.781889740712171*^9}, {3.781890196352343*^9, 
   3.7818902371128674`*^9}, {3.781890289143393*^9, 3.78189032137424*^9}, {
   3.781890410789217*^9, 3.781890443795897*^9}, {3.781892919894685*^9, 
   3.781893034204027*^9}, {3.781893303486244*^9, 3.781893305435915*^9}, {
   3.781893346475401*^9, 3.78189351213704*^9}, {3.781893557629952*^9, 
   3.7818937715703793`*^9}, {3.7818939351259747`*^9, 3.781893935309183*^9}, {
   3.781894014836615*^9, 3.7818940769861*^9}, {3.78189411661193*^9, 
   3.78189411976928*^9}, {3.781894171991082*^9, 3.781894208461198*^9}, {
   3.7818942845650663`*^9, 3.781894318603527*^9}, {3.781894361666711*^9, 
   3.7818943863602543`*^9}, {3.781894552911063*^9, 3.7818946192692204`*^9}, {
   3.7818946876585083`*^9, 3.781894810174672*^9}, {3.781894850775778*^9, 
   3.7818948516060038`*^9}, {3.781894918453796*^9, 3.781895022738206*^9}, {
   3.7818950815063257`*^9, 3.781895108760641*^9}, 3.781895174264599*^9, {
   3.781895214270892*^9, 3.781895216781312*^9}, {3.781895282366211*^9, 
   3.781895296919551*^9}, {3.781895771330106*^9, 3.7818957718478537`*^9}, {
   3.781895820713109*^9, 3.781895852846292*^9}, 3.78189590437525*^9, {
   3.781897878101182*^9, 3.781897878347925*^9}, {3.781898008898225*^9, 
   3.781898025545211*^9}, {3.7818987559128857`*^9, 3.7818988043597603`*^9}, {
   3.781898889726136*^9, 3.781898917060926*^9}, {3.78189894977267*^9, 
   3.781899034570207*^9}, {3.781900133342412*^9, 3.781900166179182*^9}, {
   3.7819003592874193`*^9, 3.781900366662415*^9}, {3.7819004103174343`*^9, 
   3.781900438125639*^9}, {3.781900473634039*^9, 3.781900486683679*^9}, 
   3.781934475319376*^9, {3.781935513752097*^9, 3.7819355686794977`*^9}, {
   3.7819364839738503`*^9, 3.781936517483794*^9}, {3.781936804381459*^9, 
   3.781936809259944*^9}, {3.7819376951833363`*^9, 3.781937742204927*^9}, 
   3.78193777781341*^9, 3.7819378158524647`*^9, {3.781941487712701*^9, 
   3.781941519519847*^9}, 3.781944858867134*^9, {3.781945029581437*^9, 
   3.78194506416438*^9}, {3.781945161803484*^9, 3.781945170713957*^9}, {
   3.781945346222933*^9, 3.781945376949377*^9}, {3.781945451524371*^9, 
   3.7819454679959173`*^9}, {3.7819459184869757`*^9, 
   3.7819459403865967`*^9}, {3.781946119529872*^9, 3.781946124165254*^9}, {
   3.781946323069056*^9, 3.7819463251708593`*^9}, {3.781946362075447*^9, 
   3.781946368729658*^9}, {3.781946458297504*^9, 3.781946482719144*^9}, {
   3.781946573215612*^9, 3.781946573805176*^9}, {3.781946627278986*^9, 
   3.781946630692567*^9}, {3.781946689916292*^9, 3.781946727557766*^9}, {
   3.781946818928884*^9, 3.781946886575436*^9}, {3.781946926758916*^9, 
   3.781946988316774*^9}, {3.781947031198398*^9, 3.781947089626081*^9}, {
   3.781949514503241*^9, 3.781949514781238*^9}, {3.781949746322733*^9, 
   3.78194974795284*^9}, {3.7819529187155313`*^9, 3.781952924925744*^9}, {
   3.781952964791218*^9, 3.781952968333682*^9}, 3.781953166500196*^9, {
   3.781953272223571*^9, 3.78195327683786*^9}, {3.78195358381081*^9, 
   3.781953612358754*^9}, {3.781958753255175*^9, 3.781958755598172*^9}, {
   3.781958811917259*^9, 3.781958815787437*^9}, {3.781958926196575*^9, 
   3.7819589264739723`*^9}, {3.781959003155731*^9, 3.781959003337261*^9}, {
   3.781959705790758*^9, 3.7819597464613247`*^9}, {3.781959853020249*^9, 
   3.7819598974828367`*^9}, {3.781959935715353*^9, 3.781959968184641*^9}, {
   3.781960453996724*^9, 3.781960458237152*^9}, {3.781960531842887*^9, 
   3.781960532985331*^9}, {3.781960775806774*^9, 3.7819608414743*^9}, {
   3.7819614409500628`*^9, 3.78196147076506*^9}, {3.781961537294071*^9, 
   3.781961541507621*^9}, {3.781961954980846*^9, 3.7819619554823847`*^9}, {
   3.781962013922822*^9, 3.7819620462490177`*^9}, {3.781962095208321*^9, 
   3.7819621321909933`*^9}, 3.781962236076475*^9, {3.781964532305806*^9, 
   3.781964557480507*^9}, {3.781964883638681*^9, 3.7819648861507063`*^9}, {
   3.781964952001689*^9, 3.7819649694449663`*^9}, {3.78196555777743*^9, 
   3.7819655608808823`*^9}, {3.781966208315856*^9, 3.78196623001517*^9}, {
   3.781967177116397*^9, 3.781967190170854*^9}, {3.78196737755392*^9, 
   3.781967378255289*^9}, {3.7819675055336237`*^9, 3.781967539563953*^9}, {
   3.781967730864592*^9, 3.781967743015132*^9}, {3.781967863854004*^9, 
   3.781967869468959*^9}, {3.781967956067936*^9, 3.781967973370903*^9}, {
   3.781968165676216*^9, 3.7819681659058313`*^9}, {3.781968600608985*^9, 
   3.78196860333549*^9}, {3.781968794388797*^9, 3.781968917352791*^9}, {
   3.781969180046114*^9, 3.781969180347095*^9}, {3.7819693081454906`*^9, 
   3.781969338623695*^9}, {3.7819695907383413`*^9, 3.781969605905559*^9}, {
   3.781969876004993*^9, 3.7819698921147757`*^9}, {3.781970719902026*^9, 
   3.781970736139946*^9}, {3.781970995712369*^9, 3.781971000602717*^9}, {
   3.781971436247281*^9, 3.7819714391894627`*^9}, {3.78197156866698*^9, 
   3.7819715721867456`*^9}, {3.781971647010206*^9, 3.7819717135675697`*^9}, {
   3.781971960364111*^9, 3.7819719702659273`*^9}, {3.781972085889913*^9, 
   3.781972089767919*^9}, {3.781972133327896*^9, 3.781972135878091*^9}, {
   3.7819723249393263`*^9, 3.781972357682006*^9}, {3.781972391185626*^9, 
   3.781972491137691*^9}, {3.78197256833368*^9, 3.781972569469337*^9}, {
   3.7819726553569527`*^9, 3.781972700170808*^9}, {3.781973060631158*^9, 
   3.781973085994631*^9}, {3.781973742727879*^9, 3.781973745719202*^9}, {
   3.7819739354184713`*^9, 3.781973964119685*^9}, {3.78197428741045*^9, 
   3.7819742906487627`*^9}, {3.7819752302231293`*^9, 3.78197531573857*^9}, {
   3.781977135613822*^9, 3.781977175483437*^9}, {3.781977206011313*^9, 
   3.781977315767405*^9}, {3.7819776364540462`*^9, 3.781977681794385*^9}, {
   3.7819777276277857`*^9, 3.781977749681239*^9}, {3.7819781258336267`*^9, 
   3.781978143440089*^9}, {3.781978184376182*^9, 3.78197820347164*^9}, {
   3.781983422426529*^9, 3.78198348698288*^9}, {3.781983537639557*^9, 
   3.781983538181918*^9}, {3.781984236747059*^9, 3.7819842372646627`*^9}, {
   3.7819847998936043`*^9, 3.781984829641018*^9}, {3.781985004598303*^9, 
   3.781985011988597*^9}, {3.781985453091732*^9, 3.781985472235598*^9}, {
   3.781985683367032*^9, 3.7819857166117163`*^9}, {3.78198645594973*^9, 
   3.781986510329571*^9}, {3.782021084678976*^9, 3.78202111526972*^9}, {
   3.782021439646668*^9, 3.782021443101561*^9}, {3.782021479644059*^9, 
   3.782021516611198*^9}, 3.782021568739341*^9, 3.7820218601288843`*^9, {
   3.7820225813362627`*^9, 3.782022584144696*^9}, {3.7820228071457977`*^9, 
   3.782022856880221*^9}, {3.782023259526617*^9, 3.7820232641280603`*^9}, {
   3.782023295895897*^9, 3.782023296077599*^9}, {3.782030475743741*^9, 
   3.782030515004929*^9}, {3.782030583078207*^9, 3.782030583571706*^9}, {
   3.782030769280892*^9, 3.782030771743113*^9}, {3.78203240114464*^9, 
   3.782032413374879*^9}, {3.78203418443826*^9, 3.782034185403325*^9}, {
   3.782034495510458*^9, 3.78203451891656*^9}, {3.782034549157374*^9, 
   3.782034558307582*^9}, {3.7820346189475327`*^9, 3.782034651193652*^9}, {
   3.782034704715548*^9, 3.782034705992672*^9}, {3.782061631507958*^9, 
   3.7820616369861393`*^9}, {3.7820616742438307`*^9, 3.782061674409451*^9}, {
   3.782061993203619*^9, 3.7820619960267353`*^9}, 3.7820621344573803`*^9, {
   3.782474725604278*^9, 3.782474745573226*^9}, {3.782474802641457*^9, 
   3.782474902846077*^9}, 3.786961758478681*^9, {3.787056756395897*^9, 
   3.7870567592885857`*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[779]:=",
 CellID->882387802,ExpressionUUID->"e800cae5-5981-4856-a1ec-aac9895c6e9b"],

Cell[BoxData[
 RowBox[{
  RowBox[{
  "InputCheck", "[", "\"\<Update$CrystalDataAutoCompletion\>\"", "]"}], ":=", 
  
  RowBox[{"(", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"FE`Evaluate", "[", 
       RowBox[{"FEPrivate`AddSpecialArgCompletion", "[", "#", "]"}], "]"}], 
      "&"}], "[", "\[IndentingNewLine]", 
     RowBox[{"\"\<$CrystalData\>\"", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
        RowBox[{"Keys", "@", "$CrystalData"}], ",", "\[IndentingNewLine]", 
        RowBox[{"{", 
         RowBox[{
         "\"\<AtomData\>\"", ",", "\"\<ChemicalFormula\>\"", ",", 
          "\"\<FormulaUnits\>\"", ",", "\[IndentingNewLine]", 
          "\"\<LatticeParameters\>\"", ",", "\"\<Notes\>\"", ",", 
          "\"\<SpaceGroup\>\"", ",", "\"\<Wavelength\>\""}], "}"}]}], 
       "\[IndentingNewLine]", "}"}]}], "]"}], ";", "\[IndentingNewLine]", 
    RowBox[{"$CrystalData", "=", 
     RowBox[{"KeySort", "@", "$CrystalData"}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"Keys", "@", "$CrystalData"}]}], "\[IndentingNewLine]", 
   ")"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.730395241910015*^9, 3.730395331782501*^9}, 
   3.73039551088382*^9, {3.7391249707350397`*^9, 3.739124986130555*^9}, {
   3.73912511330057*^9, 3.739125114641823*^9}, {3.739125407092436*^9, 
   3.7391254219192133`*^9}, {3.7391254965873337`*^9, 3.739125499857193*^9}, {
   3.739125656582911*^9, 3.739125666230063*^9}, 3.762793093803693*^9, {
   3.774162380224619*^9, 3.774162443711708*^9}, {3.774162492160576*^9, 
   3.7741625078046293`*^9}, {3.774163362510076*^9, 3.774163379723818*^9}, 
   3.78791911611233*^9, 3.78791924224485*^9},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[998]:=",
 CellID->1917205679,ExpressionUUID->"a6bbed6b-5d10-4437-b768-d6ac73fccfe0"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"InputCheck", "[", 
    RowBox[{
    "\"\<Update$CrystalDataFile\>\"", ",", "\[IndentingNewLine]", 
     "dataFile_String", ",", "newStructureLabel_String", ",", "hostCopy_"}], 
    "]"}], ":=", 
   RowBox[{"(", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"FileExistsQ", "@", "dataFile"}]}], ",", 
       RowBox[{"$CrystalData", "=", 
        RowBox[{"<|", "|>"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"AssociateTo", "[", 
      RowBox[{"$CrystalData", ",", 
       RowBox[{"newStructureLabel", "\[Rule]", "hostCopy"}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{
     "InputCheck", "[", "\"\<Update$CrystalDataAutoCompletion\>\"", "]"}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"Export", "[", 
      RowBox[{"dataFile", ",", "$CrystalData"}], "]"}], ";"}], 
    "\[IndentingNewLine]", ")"}]}], ";"}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.730395241910015*^9, 3.730395331782501*^9}, 
   3.73039551088382*^9, {3.7391249707350397`*^9, 3.739124986130555*^9}, {
   3.73912511330057*^9, 3.739125114641823*^9}, {3.739125407092436*^9, 
   3.7391254219192133`*^9}, {3.7391254965873337`*^9, 3.739125499857193*^9}, {
   3.739125656582911*^9, 3.739125666230063*^9}, 3.762793093803693*^9, {
   3.774162380224619*^9, 3.774162443711708*^9}, {3.774162492160576*^9, 
   3.7741625078046293`*^9}, {3.774163362510076*^9, 3.774163379723818*^9}, {
   3.7879191045774097`*^9, 3.787919188054097*^9}, {3.78791922146912*^9, 
   3.787919240806135*^9}, {3.7879204441162577`*^9, 3.787920445409892*^9}, {
   3.787920567072339*^9, 3.78792056829576*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[997]:=",
 CellID->1631207365,ExpressionUUID->"097f5965-43cf-4c11-8a6a-819cb61459a6"]
}, Closed]]
}, Open  ]]
},
WindowSize->Medium,
WindowMargins->Automatic,
Visible->True,
CellContext->"Global`",
FrontEndVersion->"11.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \
2018)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "FunctionPageStyles.nb", 
  CharacterEncoding -> "UTF-8"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "ExtendedExamples"->{
  Cell[28446, 685, 155, 2, 56, "ExtendedExamplesSection",ExpressionUUID->"d6f87363-4f4a-495d-87bb-c476bc779742",
   CellTags->"ExtendedExamples",
   CellID->1854448968]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"ExtendedExamples", 227940, 4992}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 723, 16, 24, "History",ExpressionUUID->"fdc71b54-ac06-4bbc-97ac-9700b4288ae1",
 CellID->1247902091],
Cell[CellGroupData[{
Cell[1306, 40, 123, 1, 29, "CategorizationSection",ExpressionUUID->"e9dddc8d-d210-4bc1-81aa-e0155fbd0f28",
 CellID->1122911449],
Cell[1432, 43, 134, 2, 30, "Categorization",ExpressionUUID->"f74d4bf7-b42e-43b0-8923-84387668c780",
 CellID->686433507],
Cell[1569, 47, 175, 3, 30, "Categorization",ExpressionUUID->"357884a1-475b-4f77-bb40-04f1f75163f9",
 CellID->605800465],
Cell[1747, 52, 174, 3, 30, "Categorization",ExpressionUUID->"853435b8-965f-48a9-8a09-7b828a751ff7",
 CellID->468444828],
Cell[1924, 57, 162, 2, 30, "Categorization",ExpressionUUID->"ea8230b8-3985-46a4-ad52-c4eb4cf86943"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2123, 64, 110, 1, 29, "KeywordsSection",ExpressionUUID->"60e8163c-620a-468e-a1e1-75370b55eaaf",
 CellID->477174294],
Cell[2236, 67, 100, 1, 70, "Keywords",ExpressionUUID->"29b99378-56fa-4d85-a5b8-449d6fe4dd15",
 CellID->1164421360]
}, Closed]],
Cell[CellGroupData[{
Cell[2373, 73, 120, 1, 19, "TemplatesSection",ExpressionUUID->"eddd82dd-3c25-4cdd-a392-bf8ca2f808d2",
 CellID->1872225408],
Cell[2496, 76, 149, 2, 70, "Template",ExpressionUUID->"d5e032e7-1745-4899-9c1c-4c24a3c98ccc",
 CellID->1562036412],
Cell[2648, 80, 137, 2, 70, "Template",ExpressionUUID->"aae2125b-a9a0-404c-9dd4-59c485c6ab9c",
 CellID->158391909],
Cell[2788, 84, 136, 2, 70, "Template",ExpressionUUID->"9f599eaa-98d9-4bec-82fd-b903bce3cfd1",
 CellID->1360575930],
Cell[2927, 88, 137, 2, 70, "Template",ExpressionUUID->"6d648b74-eb73-4649-89f8-b82322861197",
 CellID->793782254]
}, Closed]],
Cell[CellGroupData[{
Cell[3101, 95, 108, 1, 19, "DetailsSection",ExpressionUUID->"a14dbfd8-6ea5-467c-919b-4061d93639cf",
 CellID->307771771],
Cell[3212, 98, 118, 2, 70, "Details",ExpressionUUID->"2c22aab7-f8b2-4db3-8d58-a7f10104032c",
 CellID->670882175],
Cell[3333, 102, 124, 2, 70, "Details",ExpressionUUID->"73898f00-f29f-42b6-9411-63b8853a39c4",
 CellID->350963985],
Cell[3460, 106, 119, 2, 70, "Details",ExpressionUUID->"3b9ca9b3-6a6e-4025-bf93-fde8b1fc8a00",
 CellID->8391405],
Cell[3582, 110, 124, 2, 70, "Details",ExpressionUUID->"bf9075d1-d1c5-4c0f-b79c-5c5b21b66556",
 CellID->3610269],
Cell[3709, 114, 116, 2, 70, "Details",ExpressionUUID->"6af75976-a00d-4dcc-acab-d3e1df6358d0",
 CellID->401364205],
Cell[3828, 118, 116, 2, 70, "Details",ExpressionUUID->"b5c23224-9017-4a26-a9e5-5e1b475243da",
 CellID->350204745],
Cell[3947, 122, 118, 2, 70, "Details",ExpressionUUID->"c0b9fcf3-ecb2-4719-832b-98e178ef467e",
 CellID->732958810],
Cell[4068, 126, 133, 2, 70, "Details",ExpressionUUID->"b9cc9b4f-d0ef-4ae5-afc2-f1f0c3a21aa6",
 CellID->222905350],
Cell[4204, 130, 122, 2, 70, "Details",ExpressionUUID->"130363d4-35b8-4193-8170-e591801c3073",
 CellID->240026365]
}, Closed]],
Cell[CellGroupData[{
Cell[4363, 137, 108, 1, 63, "ObjectName",ExpressionUUID->"3baa8d83-4af8-44db-8ef6-3d3268c9ff04",
 CellID->1224892054],
Cell[4474, 140, 2114, 54, 116, "Usage",ExpressionUUID->"41256e38-425c-470a-8ab5-cfb59d42c9ac",
 CellID->982511436],
Cell[6591, 196, 349, 6, 41, "Notes",ExpressionUUID->"001f21fe-2a54-4b11-872c-0fba927120ca",
 CellID->1871022088],
Cell[6943, 204, 330, 8, 25, "Notes",ExpressionUUID->"76d29b1a-3291-40a4-b01f-8ff190a41293",
 CellID->1609912826],
Cell[7276, 214, 8313, 161, 439, "2ColumnTableMod",ExpressionUUID->"3103cd53-00df-4411-965b-4abf63b7101f",
 CellID->222684676],
Cell[15592, 377, 423, 7, 25, "Notes",ExpressionUUID->"8484f326-b3fa-4348-934d-718b122fc57f",
 CellID->221498276],
Cell[16018, 386, 3791, 74, 131, "2ColumnTableMod",ExpressionUUID->"cdb14cca-8cd5-4f48-a1cf-86ce05380363",
 CellID->1183224025],
Cell[19812, 462, 822, 21, 27, "Notes",ExpressionUUID->"d4a11f0a-aaba-46df-b325-8f93165e101d",
 CellID->1298381760],
Cell[20637, 485, 602, 12, 59, "Notes",ExpressionUUID->"7251811d-94d2-4407-9797-e6db10c5a23b",
 CellID->1980014868],
Cell[21242, 499, 642, 13, 41, "Notes",ExpressionUUID->"c8f47927-3ddc-40a6-82b0-ef04babec71b",
 CellID->283416834],
Cell[21887, 514, 1271, 21, 95, "2ColumnTableMod",ExpressionUUID->"19a93e2a-2192-426a-a1d0-af143e27aeb6",
 CellID->1473782279]
}, Open  ]],
Cell[CellGroupData[{
Cell[23195, 540, 112, 1, 44, "TutorialsSection",ExpressionUUID->"e9f00a5a-edd0-4bfb-9d62-cdb78d58f8cd",
 CellID->250839057],
Cell[23310, 543, 285, 4, 16, "Tutorials",ExpressionUUID->"4551fb7f-c2d2-4841-a50b-d7c6d7b29168",
 CellID->341631938],
Cell[23598, 549, 101, 1, 16, "Tutorials",ExpressionUUID->"ffe234c0-d9f9-4a50-b5cc-af7ff673b32a",
 CellID->1463871110]
}, Open  ]],
Cell[CellGroupData[{
Cell[23736, 555, 138, 1, 31, "RelatedDemonstrationsSection",ExpressionUUID->"7d7e4ddc-ff24-46b0-ab50-8cae9facf2e4",
 CellID->1268215905],
Cell[23877, 558, 113, 1, 16, "RelatedDemonstrations",ExpressionUUID->"5203a146-6140-40a7-9ab3-82202a61da10",
 CellID->1129518860]
}, Open  ]],
Cell[CellGroupData[{
Cell[24027, 564, 120, 1, 31, "RelatedLinksSection",ExpressionUUID->"1b8f8346-6e94-40dc-8d25-c0eb7572bb7b",
 CellID->1584193535],
Cell[24150, 567, 104, 1, 16, "RelatedLinks",ExpressionUUID->"3e7c68e8-cd5c-4aef-ae06-a19bcff9cad4",
 CellID->1038487239]
}, Open  ]],
Cell[CellGroupData[{
Cell[24291, 573, 110, 1, 31, "SeeAlsoSection",ExpressionUUID->"cd66dfec-b844-4e8d-bbc6-50e2b739eee8",
 CellID->1255426704],
Cell[24404, 576, 3338, 82, 75, "SeeAlso",ExpressionUUID->"de3c51f2-79e1-44fd-85a3-a08757257073",
 CellID->929782353]
}, Open  ]],
Cell[CellGroupData[{
Cell[27779, 663, 112, 1, 31, "MoreAboutSection",ExpressionUUID->"3ade4251-f64b-4f1c-b390-ef6e588014a9",
 CellID->38303248],
Cell[27894, 666, 101, 1, 16, "MoreAbout",ExpressionUUID->"13391473-9a54-4fc0-b37a-9a3a1700f031",
 CellID->1665078683]
}, Open  ]],
Cell[28010, 670, 411, 11, 70, "PrimaryExamplesSection",ExpressionUUID->"4776a377-a5f0-4a8b-a91a-c0f6323166ab",
 CellID->880084151],
Cell[CellGroupData[{
Cell[28446, 685, 155, 2, 56, "ExtendedExamplesSection",ExpressionUUID->"d6f87363-4f4a-495d-87bb-c476bc779742",
 CellTags->"ExtendedExamples",
 CellID->1854448968],
Cell[CellGroupData[{
Cell[28626, 691, 242, 5, 33, "ExampleSection",ExpressionUUID->"acea0833-02cc-4701-aaf3-a3f17f675653",
 CellID->1293636265],
Cell[CellGroupData[{
Cell[28893, 700, 424, 8, 24, "ExampleSubsection",ExpressionUUID->"2841bc05-4b3e-44c8-b508-51391b398f09",
 CellID->1809017597],
Cell[29320, 710, 205, 2, 22, "ExampleText",ExpressionUUID->"0a82a8cc-fb85-4469-a1af-3ea44c4eb58c",
 CellID->1837160032],
Cell[CellGroupData[{
Cell[29550, 716, 371, 7, 27, "Input",ExpressionUUID->"d699e5c1-a445-41a3-8e98-9bb4d0257a6e",
 CellID->1367903769],
Cell[29924, 725, 682, 12, 22, "Message",ExpressionUUID->"623443de-6cd1-44c8-a00e-e8ce10e3b5cb",
 CellID->794902605],
Cell[30609, 739, 275, 5, 25, "Output",ExpressionUUID->"3c4eaf1a-a76a-410d-aca0-18528acaecb5",
 CellID->432314248]
}, Open  ]],
Cell[CellGroupData[{
Cell[30921, 749, 336, 8, 27, "Input",ExpressionUUID->"c1ae7082-04fb-4c8d-8f91-833ea8aaae60",
 CellID->1815249394],
Cell[31260, 759, 683, 12, 22, "Message",ExpressionUUID->"44fd7dd5-5983-4d1c-b671-f4f0dd92f1f9",
 CellID->1394884042],
Cell[31946, 773, 273, 5, 25, "Output",ExpressionUUID->"c9d82153-4f63-4cc4-9322-b599b1c8f86a",
 CellID->1884603242]
}, Open  ]],
Cell[CellGroupData[{
Cell[32256, 783, 483, 13, 27, "Input",ExpressionUUID->"f476ddf7-29ae-47ac-bba9-4c9401d0bcfa",
 CellID->461672276],
Cell[32742, 798, 685, 12, 22, "Message",ExpressionUUID->"7dc776de-315c-4572-8c91-22d206c42e29",
 CellID->1892393033],
Cell[33430, 812, 274, 5, 25, "Output",ExpressionUUID->"8a6f2c92-f0ce-463e-98de-329b5bc5b419",
 CellID->1216893561]
}, Open  ]],
Cell[CellGroupData[{
Cell[33741, 822, 242, 5, 17, "ExampleDelimiter",ExpressionUUID->"0e182396-b6d4-4b4e-be5e-786810256602",
 CellID->467526121],
Cell[CellGroupData[{
Cell[34008, 831, 516, 13, 27, "Input",ExpressionUUID->"06f3f384-6d0f-4d06-9976-949245899583",
 CellID->1466599491],
Cell[34527, 846, 413, 8, 22, "Message",ExpressionUUID->"4483dae0-52c8-4b56-82a8-9b20344d0c7a",
 CellID->2071145711],
Cell[34943, 856, 269, 4, 25, "Output",ExpressionUUID->"4bac1ab8-984f-4a8b-97fd-277217eaed66",
 CellID->1183530554]
}, Open  ]],
Cell[CellGroupData[{
Cell[35249, 865, 523, 13, 27, "Input",ExpressionUUID->"928167ca-584a-48ad-ad2d-cd4c49d9ac0e",
 CellID->320344971],
Cell[35775, 880, 369, 7, 22, "Message",ExpressionUUID->"cee04f01-ac18-4a0e-9082-0dd907468543",
 CellID->1251631147],
Cell[36147, 889, 267, 4, 25, "Output",ExpressionUUID->"44f5441f-3548-4ac5-a5a5-fc9ce004dbac",
 CellID->1562365264]
}, Open  ]],
Cell[CellGroupData[{
Cell[36451, 898, 533, 14, 29, "Input",ExpressionUUID->"e47e6529-b345-44e5-9a14-9d0c02d0d549",
 CellID->296424568],
Cell[36987, 914, 396, 8, 22, "Message",ExpressionUUID->"c750b64f-589e-459a-9a9a-55cf5e21a8fa",
 CellID->1484014596],
Cell[37386, 924, 267, 4, 25, "Output",ExpressionUUID->"dc6fcbcd-d467-4556-9a6b-176cfc04c677",
 CellID->958238714]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[37702, 934, 243, 5, 17, "ExampleDelimiter",ExpressionUUID->"a44c8ca0-8ed4-4e93-bee7-4cf7666b37f8",
 CellID->1993136983],
Cell[37948, 941, 283, 6, 27, "Input",ExpressionUUID->"ea7f89c5-66d8-48cb-be36-c83cb0ffdf97",
 CellID->81829532],
Cell[CellGroupData[{
Cell[38256, 951, 357, 9, 29, "Input",ExpressionUUID->"7c8f1a6e-cfab-4db6-b719-ea915c08d7a8",
 CellID->919410244],
Cell[38616, 962, 434, 9, 25, "Output",ExpressionUUID->"e63781a7-a550-4b40-bf38-114535fbe48d",
 CellID->583840801]
}, Open  ]],
Cell[CellGroupData[{
Cell[39087, 976, 475, 13, 29, "Input",ExpressionUUID->"11bd0f99-b66f-4789-b2df-e070f9d19f82",
 CellID->1383130743],
Cell[39565, 991, 518, 12, 25, "Output",ExpressionUUID->"d64395cb-e0f9-4c6d-b8b5-394a5e411cb2",
 CellID->1181569721]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[40144, 1010, 375, 7, 24, "ExampleSubsection",ExpressionUUID->"9ee1c3d9-a461-4d27-bc1b-f2a8dae5b33a",
 CellID->417524222],
Cell[CellGroupData[{
Cell[40544, 1021, 332, 6, 29, "Input",ExpressionUUID->"c10b12f9-4871-45c0-8891-d1f2f73cf981",
 CellID->384054987],
Cell[40879, 1029, 644, 19, 44, "Output",ExpressionUUID->"719d1440-8c48-4a09-b5a1-c9e43ce13282",
 CellID->1575633488]
}, Open  ]],
Cell[CellGroupData[{
Cell[41560, 1053, 243, 5, 17, "ExampleDelimiter",ExpressionUUID->"6d00d4e4-5e8d-4219-b145-61ac051b3cb1",
 CellID->1117509503],
Cell[CellGroupData[{
Cell[41828, 1062, 425, 9, 30, "Input",ExpressionUUID->"e53588fc-e2fb-46a2-bc6c-0b1b70ebeef8",
 CellID->544578231],
Cell[42256, 1073, 393, 8, 31, "Output",ExpressionUUID->"984edd04-f759-4bcf-9fe5-3a51876dd1d2",
 CellID->989087980]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[42698, 1087, 241, 5, 17, "ExampleDelimiter",ExpressionUUID->"5b4aa924-618a-4ba2-9ac2-cdfc4ed727ec",
 CellID->92703433],
Cell[CellGroupData[{
Cell[42964, 1096, 334, 6, 27, "Input",ExpressionUUID->"0063f588-4570-4e7d-bd04-72f6fc6f995b",
 CellID->1138377229],
Cell[43301, 1104, 294, 5, 26, "Output",ExpressionUUID->"40f37307-9d7d-4179-a3b8-e87e5aa8a74d",
 CellID->2041059921]
}, Open  ]],
Cell[CellGroupData[{
Cell[43632, 1114, 640, 13, 47, "Input",ExpressionUUID->"15b3a064-a41a-423f-a1b1-a7708d980798",
 CellID->1889735775],
Cell[44275, 1129, 518, 10, 26, "Output",ExpressionUUID->"cdf4ce3c-7a4f-41b7-80bd-e0bb7933fc1b",
 CellID->1404914664]
}, Open  ]],
Cell[CellGroupData[{
Cell[44830, 1144, 337, 6, 27, "Input",ExpressionUUID->"97619ab2-dc5c-4729-b7e8-4409d85ec417",
 CellID->2118692029],
Cell[45170, 1152, 294, 5, 26, "Output",ExpressionUUID->"1920b591-b1e5-4177-83fb-29c1316df47b",
 CellID->62486888]
}, Open  ]],
Cell[CellGroupData[{
Cell[45501, 1162, 333, 6, 27, "Input",ExpressionUUID->"172704c2-2e80-4016-a0b0-b1a9802c3fb8",
 CellID->334541063],
Cell[45837, 1170, 543, 10, 22, "Message",ExpressionUUID->"2f5c556b-c488-42ae-8eef-846cfacd4def",
 CellID->432340259],
Cell[46383, 1182, 267, 4, 26, "Output",ExpressionUUID->"360e4654-e0c9-4c2d-a593-10a01cc6144b",
 CellID->1405555212]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[46699, 1192, 243, 5, 17, "ExampleDelimiter",ExpressionUUID->"a4de24e1-d680-405e-ad04-f6f7a919178a",
 CellID->2081050686],
Cell[CellGroupData[{
Cell[46967, 1201, 321, 7, 29, "Input",ExpressionUUID->"c59db728-6ebb-424e-a415-9f5e900fcdff",
 CellID->537426626],
Cell[47291, 1210, 410, 11, 25, "Output",ExpressionUUID->"4dda3ddc-a939-4230-8d28-02a05a3652fd",
 CellID->1199856089]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[47750, 1227, 243, 5, 17, "ExampleDelimiter",ExpressionUUID->"39d31d1b-d859-419c-b8b4-20df7d1d5bc8",
 CellID->1593279856],
Cell[CellGroupData[{
Cell[48018, 1236, 436, 10, 26, "Input",ExpressionUUID->"8bd5ddce-f3e6-4ef8-9733-0cb6942504f8",
 CellID->685727073],
Cell[48457, 1248, 959, 19, 44, "Output",ExpressionUUID->"629f92cc-7bdc-41df-90cb-93617f0c9d1d",
 CellID->435726054]
}, Open  ]],
Cell[CellGroupData[{
Cell[49453, 1272, 740, 18, 69, "Input",ExpressionUUID->"4b36b02f-4612-4ad4-9f62-a18c3199d740",
 CellID->324919468],
Cell[50196, 1292, 287, 5, 25, "Output",ExpressionUUID->"4eb6533a-9159-4dc6-bbda-cc67298c43e2",
 CellID->905036467]
}, Open  ]],
Cell[CellGroupData[{
Cell[50520, 1302, 250, 5, 26, "Input",ExpressionUUID->"b9ad1ba9-3c22-4ac0-aad9-bff1def0b927",
 CellID->2128016662],
Cell[50773, 1309, 869, 20, 60, "Output",ExpressionUUID->"3b65720b-40b5-4f7d-8a59-f0b7a37efc23",
 CellID->527829054]
}, Open  ]],
Cell[CellGroupData[{
Cell[51679, 1334, 944, 26, 88, "Input",ExpressionUUID->"58b5f2e2-c1ba-4516-9a3d-9299dc081fa5",
 CellID->1159887342],
Cell[52626, 1362, 799, 19, 60, "Output",ExpressionUUID->"1717ef9f-a28d-4ef7-a942-95007a1b8721",
 CellID->883838968]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[53474, 1387, 243, 5, 17, "ExampleDelimiter",ExpressionUUID->"cca9c508-5d6e-4486-9bcc-da2e2af4f833",
 CellID->1574356691],
Cell[53720, 1394, 387, 10, 37, "ExampleText",ExpressionUUID->"cfadec37-356d-4dd0-93bf-90c71f9d319a",
 CellID->704249145],
Cell[CellGroupData[{
Cell[54132, 1408, 390, 9, 48, "Input",ExpressionUUID->"cdc34780-d198-43bb-890d-daba3764a219",
 CellID->1895227847],
Cell[54525, 1419, 907, 23, 76, "Output",ExpressionUUID->"ff66bad9-d1f7-4154-b730-0d054b6202c2",
 CellID->284923126]
}, Open  ]],
Cell[CellGroupData[{
Cell[55469, 1447, 392, 9, 50, "Input",ExpressionUUID->"2c8735f6-9329-472a-9587-eaa7a5d2b171",
 CellID->826492967],
Cell[55864, 1458, 844, 22, 58, "Output",ExpressionUUID->"2302491d-9987-422a-ba8a-3654cb574e4f",
 CellID->906336988]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[56759, 1486, 265, 5, 33, "ExampleSection",ExpressionUUID->"dc89e3eb-0fa8-4aea-be71-c0557c05fecd",
 CellID->1020263627],
Cell[CellGroupData[{
Cell[57049, 1495, 244, 5, 21, "ExampleSection",ExpressionUUID->"294ace5b-178b-44eb-948d-0a5b45b96055",
 CellID->2061341341],
Cell[57296, 1502, 247, 5, 70, "ExampleSubsection",ExpressionUUID->"0e958035-0e1c-4674-8054-d2569cff9ff6",
 CellID->1757724783],
Cell[57546, 1509, 247, 5, 70, "ExampleSubsection",ExpressionUUID->"2bedbe77-d0e7-41b5-89aa-cc033f703185",
 CellID->1295379749]
}, Closed]],
Cell[57808, 1517, 248, 5, 21, "ExampleSection",ExpressionUUID->"8d11c5d5-92af-4b2d-ab64-9a75e73d64d4",
 CellID->258228157],
Cell[58059, 1524, 259, 5, 21, "ExampleSection",ExpressionUUID->"0a089dea-60a2-4b90-9f38-ed29be39e050",
 CellID->2123667759],
Cell[58321, 1531, 252, 5, 21, "ExampleSection",ExpressionUUID->"3cefeac4-125e-4e02-a713-78af05ed4e4b",
 CellID->1305812373],
Cell[58576, 1538, 257, 5, 21, "ExampleSection",ExpressionUUID->"859c3c71-7303-4a22-902a-f6507b2d377d",
 CellID->1653164318],
Cell[58836, 1545, 249, 5, 21, "ExampleSection",ExpressionUUID->"da3fa7ce-3a1d-4e60-80ea-58ff3f9d1ef3",
 CellID->589267740],
Cell[CellGroupData[{
Cell[59110, 1554, 373, 8, 21, "ExampleSection",ExpressionUUID->"d27ab792-63b6-43fc-a7d1-f21dcce82e00",
 CellID->13108794],
Cell[59486, 1564, 10415, 217, 1211, "Input",ExpressionUUID->"c03b076a-d5c7-40d6-a76d-04eb0072d1d5",
 InitializationCell->False,
 CellID->1391889154],
Cell[69904, 1783, 15659, 327, 70, "Input",ExpressionUUID->"554eb433-209f-41d2-bf17-a537b8f0a5c1",
 InitializationCell->False,
 CellID->941644507],
Cell[85566, 2112, 1835, 37, 70, "Input",ExpressionUUID->"2c76902b-4762-4c2c-add2-65b46e36694c",
 InitializationCell->False,
 CellID->1412234406],
Cell[87404, 2151, 5118, 121, 70, "Input",ExpressionUUID->"80692ab8-e439-431f-9266-7e92ecff654c",
 InitializationCell->False,
 CellID->1434394998],
Cell[92525, 2274, 13143, 254, 70, "Input",ExpressionUUID->"89c28393-f736-463a-b54c-35d4a9f923d0",
 InitializationCell->False,
 CellID->225310164],
Cell[105671, 2530, 3811, 76, 70, "Input",ExpressionUUID->"f0c05d03-3df7-4851-955a-9302fdb797e3",
 InitializationCell->False,
 CellID->774256687],
Cell[109485, 2608, 2926, 59, 70, "Input",ExpressionUUID->"8a7813c1-bcb2-42ed-9d22-dccdd1260a19",
 InitializationCell->False,
 CellID->1328721236],
Cell[112414, 2669, 2926, 61, 70, "Input",ExpressionUUID->"19f3b089-ef31-4e1f-862b-0cae6d268263",
 InitializationCell->False,
 CellID->135368299],
Cell[115343, 2732, 8957, 176, 70, "Input",ExpressionUUID->"22e5d93f-0878-4727-83c1-974ef0cb7024",
 InitializationCell->False,
 CellID->949819120],
Cell[124303, 2910, 5381, 114, 70, "Input",ExpressionUUID->"8d7a0ffb-c7e6-42a6-966b-9ee1ca05b563",
 InitializationCell->False,
 CellID->1364001689],
Cell[129687, 3026, 23041, 392, 70, "Input",ExpressionUUID->"f1faa499-df0a-490c-90f2-cc4696471366",
 InitializationCell->False,
 CellID->388455298],
Cell[152731, 3420, 20073, 411, 70, "Input",ExpressionUUID->"9ca230e4-669e-4c4b-b339-de248e88e66a",
 InitializationCell->False,
 CellID->417906606],
Cell[172807, 3833, 17497, 375, 70, "Input",ExpressionUUID->"eb00d2e1-a7b9-4529-a9e2-ea3a353768d7",
 InitializationCell->False,
 CellID->1484801352],
Cell[190307, 4210, 1570, 34, 70, "Input",ExpressionUUID->"88c16eb4-e821-4949-94f4-4af75887aae7",
 InitializationCell->False,
 CellID->1296344924],
Cell[191880, 4246, 1291, 31, 70, "Input",ExpressionUUID->"8e56b7e1-e379-4e45-ab8b-50d1b34595dc",
 InitializationCell->False,
 CellID->1447538853],
Cell[193174, 4279, 2105, 42, 70, "Input",ExpressionUUID->"80b7df9d-e33f-46d4-8b82-03afb2d25747",
 InitializationCell->False,
 CellID->2090749155],
Cell[195282, 4323, 1537, 35, 142, "Input",ExpressionUUID->"224cfbfe-443b-4170-b2d1-73bf36ac473b",
 InitializationCell->False,
 CellID->2093615871],
Cell[196822, 4360, 27026, 533, 2208, "Input",ExpressionUUID->"e800cae5-5981-4856-a1ec-aac9895c6e9b",
 InitializationCell->False,
 CellID->882387802],
Cell[223851, 4895, 1819, 38, 209, "Input",ExpressionUUID->"a6bbed6b-5d10-4437-b768-d6ac73fccfe0",
 InitializationCell->False,
 CellID->1917205679],
Cell[225673, 4935, 1841, 39, 171, "Input",ExpressionUUID->"097f5965-43cf-4c11-8a6a-819cb61459a6",
 InitializationCell->False,
 CellID->1631207365]
}, Closed]]
}, Open  ]]
}
]
*)

